home *** CD-ROM | disk | FTP | other *** search
/ PC-SIG: Essential Home & Business / PC-SIG - Essential Home and Business Collection.iso / 17 / 7 / 3 / 4DOS.ZIP / 4DOS.DOC < prev    next >
Text File  |  1991-04-12  |  345KB  |  10,906 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.                               4DOS Version 3.03
  22.  
  23.  
  24.  
  25.                      A PC-DOS / MS-DOS Command Processor
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.                               Distributed by:
  39.  
  40.                               JP Software, Inc.
  41.                               P.O. Box 1470
  42.                               E. Arlington, MA 02174, USA
  43.                               (617) 646-3975
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                _______
  64.           ____|__     |               (tm)
  65.        --|       |    |-------------------
  66.          |   ____|__  |  Association of
  67.          |  |       |_|  Shareware
  68.          |__|   o   |    Professionals
  69.        -----|   |   |---------------------
  70.             |___|___|    MEMBER
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.                     Written by Rex C. Conn and Tom Rawson
  78.  
  79.  
  80.  
  81.                     JP Software, Inc.
  82.                     P.O. Box 1470
  83.                     E. Arlington, MA 02174, USA
  84.                     (617) 646-3975  voice
  85.                     (617) 646-0904  fax
  86.                     (800) 368-8777  orders only
  87.  
  88.  
  89.    Electronic mail to:
  90.                     CompuServe 75300,210
  91.                     BIX "trawson"
  92.                     InterNet, Bitnet, etc.:  75300.210@compuserve.com
  93.  
  94.  
  95.    Program and Documentation Copyright 1988 - 1991, Rex C. Conn and
  96.    JP Software, Inc.  All rights reserved.
  97.  
  98.    Portions Copyright 1987, 1988, 1990 Microsoft Corporation
  99.    Portions Copyright 1987, 1989 Borland International
  100.    Portions Copyright 1987, 1988, 1989 TurboPower Software
  101.  
  102.  
  103.    4DOS is a registered trademark of JP Software Inc.
  104.    PC-DOS, PC, PC XT, PC AT, and PS/2 are trademarks of IBM Corporation.
  105.    MS-DOS, OS/2, and Windows are trademarks of Microsoft Corporation.
  106.    1-2-3 is a trademark of Lotus Development Corporation.
  107.    dBASE is a trademark of Ashton Tate.
  108.    386-To-The-Max and Move-Em are trademarks of Qualitas Inc.
  109.    DESQview and QEMM are trademarks of Quarterdeck Office Systems
  110.    Brief is a trademark of UnderWare Inc.
  111.  
  112.  
  113.  
  114.  
  115.  
  116.    4DOS Reference Manual         Copyright 1991, JP Software Inc.          
  117.  
  118.  
  119.  
  120.                                ACKNOWLEDGEMENTS
  121.  
  122.    We couldn't produce a product like 4DOS without the dedication and
  123.    quality work of many people.  Our thanks to all these folks:
  124.  
  125.         JP Software staff:  Mike Bessy, Helen Coyne, Hayyim Feldman,
  126.         Henry Harvey, Susan Mampre, Ellen Stone.
  127.  
  128.         Beta testers:  Bruce Aldrich, Mike Bessy, David Birnbaum, Jeff
  129.         Bishop, "Dr. File Finder" (Mike Callahan), Gary Clanfield, John
  130.         Cooper, Chris DeVoney, Emanuel Donchin, Stan Dvoskin, John
  131.         Fleming, Doug Frank, Peter Frank, Gary Gibson, Tim Grissom, Ken
  132.         Harwell, Keith Hawes, Bob Huntley, John James, Tom Kellen, Bob
  133.         Kertesz, Dave Lemire, Kevin Lockwood, Brad McDonald, John McKown,
  134.         Burt Model, Stuart Moore, Phil Newman, Jorge Ochoa-Lions, Shakib
  135.         Otaqui, John Peterson, Ed Phillips, Mike Phillips, Sam Pierce,
  136.         Chip Rabinowitz, Dan Rawson, David Rodman, Chris Rousseau, Alan
  137.         Samuels, Guy Scharf, Martin Schiff, Bill Shaffer, Malcolm Shealy,
  138.         Stephen Spehn, Michael Stein, Ted Thompson, Brian Trainer, Thomas
  139.         Traubitz, Randy Wallin, Bill Walton, Iram Weinstein, Joe Zott,
  140.         and anyone else we forgot!
  141.  
  142.         Beta test support:  David Moskowitz, Guy Scharf, and all the
  143.         sysops of the CompuServe CONSULT forum.
  144.  
  145.         BBS support:  Channel 1 sysops Brian Miller and Tess Heder.
  146.  
  147.  
  148.    The 4DOS 3.0 HELP system was originally written by Ross Neilson
  149.    Wentworth, and is now owned and distributed by JP Software.
  150.  
  151.    The following tools are used in creating and maintaining 4DOS:
  152.  
  153.         Compilers:          Microsoft C 6.0 and Macro Assembler 5.1
  154.                             Turbo Pascal 5.5 (Borland)
  155.         Libraries:          Turbo Professional 5.0 (TurboPower Software)
  156.         Editors:            Edix (Emerging Technology), Brief (Solution
  157.                             Systems)
  158.         Debuggers:          Periscope (The Periscope Company), Soft-ICE
  159.                             (Nu-Mega Technologies)
  160.         Version Control:    PVCS (Polytron)
  161.  
  162.    The following suppliers produce the finished product:
  163.  
  164.         Manual Printing:    Causeway Print, Boston
  165.         Disk Duplication:   Diversified Systems Group, Issaquah, WA
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.   4DOS Reference Manual         Copyright 1991, JP Software Inc.           
  175.  
  176.  
  177.   TABLE OF CONTENTS
  178.  
  179.        Introduction                      i
  180.  
  181.             Registration Information    ii
  182.             4DOS License Agreement     iii
  183.             Technical Support           vi
  184.  
  185.  
  186.        4DOS Features                     1
  187.  
  188.  
  189.        Installation                      9
  190.  
  191.             4DOS Files                  10
  192.             Test Driving 4DOS           11
  193.             Quick Start                 12
  194.             Automatic Installation      13
  195.             DOS Shells Explained        14
  196.             COMSPEC                     15
  197.             Manual Installation         16
  198.             Memory Usage                18
  199.             Setting up CONFIG.SYS       19
  200.             Startup Options             21
  201.             4DSHELL                     25
  202.             AUTOEXEC and 4START         25
  203.             4DOS and COMMAND.COM        26
  204.  
  205.  
  206.        Using 4DOS                       27
  207.  
  208.             Starting 4DOS               27
  209.             Command Line Editing        28
  210.             Command History and Recall  29
  211.             Multiple Commands           30
  212.             Conditional Commands        30
  213.             Escape Character            31
  214.             Command Echoing             32
  215.             Argument Quoting            32
  216.             Batch Files                 33
  217.             Aliases                     35
  218.             Executable Extensions       37
  219.             Keystack                    39
  220.             Environment Variables       40
  221.             Variable Functions          42
  222.             I/O Redirection             43
  223.             Command Parsing             45
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.   4DOS Reference Manual         Copyright 1991, JP Software Inc.           
  233.  
  234.  
  235.        Command Reference Guide          46
  236.  
  237.             ?                           48
  238.             ALIAS                       49
  239.             ATTRIB                      52
  240.             BEEP                        53
  241.             BREAK                       54
  242.             CALL                        55
  243.             CANCEL                      56
  244.             CD / CHDIR                  57
  245.             CDD                         58
  246.             CHCP                        59
  247.             CLS                         60
  248.             COLOR                       61
  249.             COPY                        62
  250.             CTTY                        64
  251.             DATE                        65
  252.             DEL / ERASE                 66
  253.             DELAY                       67
  254.             DESCRIBE                    68
  255.             DIR                         69
  256.             DIRS                        72
  257.             DRAWBOX                     73
  258.             DRAWHLINE                   74
  259.             DRAWVLINE                   75
  260.             ECHO                        76
  261.             ENDLOCAL                    77
  262.             ESET                        78
  263.             EXCEPT                      79
  264.             EXIT                        80
  265.             FOR                         81
  266.             FREE                        82
  267.             GLOBAL                      83
  268.             GOSUB                       84
  269.             GOTO                        85
  270.             HELP                        86
  271.             HISTORY                     87
  272.             IF                          88
  273.             IFF                         91
  274.             INKEY                       92
  275.             INPUT                       93
  276.             KEYSTACK                    94
  277.             LIST                        95
  278.             LOG                         97
  279.             MD / MKDIR                  98
  280.             MEMORY                      99
  281.             MOVE                       100
  282.             PATH                       102
  283.             PAUSE                      103
  284.             POPD                       104
  285.             PROMPT                     105
  286.             PUSHD                      107
  287.  
  288.  
  289.  
  290.   4DOS Reference Manual         Copyright 1991, JP Software Inc.           
  291.  
  292.  
  293.             QUIT                       108
  294.             RD / RMDIR                 109
  295.             REM                        110
  296.             REN / RENAME               111
  297.             RETURN                     112
  298.             SCREEN                     113
  299.             SCRPUT                     114
  300.             SELECT                     115
  301.             SET                        117
  302.             SETDOS                     119
  303.             SETLOCAL                   122
  304.             SHIFT                      123
  305.             SWAPPING                   124
  306.             TEE                        125
  307.             TEXT                       126
  308.             TIME                       127
  309.             TIMER                      128
  310.             TYPE                       129
  311.             UNALIAS                    130
  312.             UNSET                      131
  313.             VER                        132
  314.             VERIFY                     133
  315.             VOL                        134
  316.             Y                          135
  317.  
  318.  
  319.        Appendix A - Error messages     136
  320.  
  321.  
  322.        Appendix B - ASP                146
  323.  
  324.  
  325.        Appendix C - Key codes          148
  326.  
  327.  
  328.        Appendix D- Programming         149
  329.  
  330.  
  331.        Appendix E - Tips and
  332.             Troubleshooting            150
  333.  
  334.  
  335.        Glossary                        162
  336.  
  337.  
  338.        Index                           173
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.   4DOS Reference Manual         Copyright 1991, JP Software Inc.           
  349.  
  350.  
  351.  
  352.   Introduction
  353.  
  354.        Welcome, and thanks for trying 4DOS!
  355.  
  356.        4DOS is designed to help you get the most out of your IBM PC or
  357.        compatible system.  It replaces COMMAND.COM, the command
  358.        interpreter that comes with all versions of MS-DOS and PC-DOS.
  359.  
  360.        You'll find 4DOS provides a wide variety of capabilities
  361.        COMMAND.COM can't, ranging from a vastly enhanced DIR command, to
  362.        point-and-shoot file selection for any command, to the ability to
  363.        completely redefine your system's commands.  Yet 4DOS is fully
  364.        compatible with COMMAND.COM.
  365.  
  366.        4DOS is a "DOS shell" (a program that gives you access to DOS
  367.        functions and commands), but it's unlike most DOS shells on the
  368.        market.  Virtually all of these shells are designed to isolate
  369.        the novice user from the DOS command line.  4DOS, on the other
  370.        hand, is intended to make DOS easier to use and to make you more
  371.        productive while working at the command line.  It provides
  372.        enhancements to most of the DOS commands, as well as more than 40
  373.        new commands.  These improvements make 4DOS a much richer and
  374.        more powerful working environment than COMMAND.COM, without
  375.        sacrificing the compatibility, flexibility and control you get
  376.        from working at the command line.  If you're tired of the
  377.        limitations of COMMAND.COM, you'll love 4DOS!
  378.  
  379.        4DOS is distributed as shareware, which means if you've
  380.        downloaded it from a bulletin board or obtained it from a friend,
  381.        you can try it out before you decide whether you'd like to keep
  382.        it.  Like all shareware, if you do decide to keep 4DOS, you must
  383.        pay a registration fee.
  384.  
  385.        4DOS is also distributed through normal retail channels.  If you
  386.        purchased a retail copy of 4DOS, it includes a shareware disk
  387.        which you can share with your friends and associates.
  388.  
  389.        The following pages include information on registration, the 4DOS
  390.        license agreement, and technical support for 4DOS.
  391.  
  392.        The text in this ASCII manual is essentially the same as that in
  393.        the printed manual.  Changes from the original version 3.0 manual
  394.        have been made to correct typographical errors or document small
  395.        changes in the software, but a few significant new features which
  396.        would require repagination of the text are not included.  For
  397.        complete documentation on changes in versions 3.01 through 3.03
  398.        see the file UPDATE30.DOC.
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.   4DOS Reference Manual         Copyright 1991, JP Software Inc.         i 
  407.  
  408.  
  409.   Registration Information
  410.  
  411.        4DOS is a copyrighted program protected by both U.S. and
  412.        international copyright law.  If you obtained 4DOS from a
  413.        shareware disk vendor, an on-line computer service or bulletin
  414.        board, a friend or colleague, or another similar source, you have
  415.        an unregistered (trial) copy.  You are authorized to use this
  416.        copy without charge for a limited period of time under the terms
  417.        of the 4DOS license agreement.  After this time is up, you must
  418.        register and pay for 4DOS to continue using it.
  419.  
  420.        This method of distribution is known as shareware.  It allows you
  421.        to determine whether 4DOS meets your needs before you pay for it.
  422.  
  423.        The registration fee for a single copy of 4DOS is $50.  Payment
  424.        of this fee entitles you to:
  425.  
  426.          ∙    A disk with the latest version of 4DOS, registered to you,
  427.               and a copy of the typeset-quality printed and bound 4DOS
  428.               manual.
  429.  
  430.          ∙    An upgrade to the next major release of 4DOS.
  431.                 (There is no charge from JP Software for downloading an
  432.                 upgrade or maintenance release.  For an upgrade on diskette
  433.                 there will be a minimal charge to cover our cost in
  434.                 sending it to you.)
  435.  
  436.          ∙    Technical support via electronic mail or telephone.
  437.  
  438.          ∙    A subscription to the 4DOS newsletter.
  439.  
  440.        If you prefer, you may register for $35 and receive only the disk
  441.        and notices of future upgrades.  Multi-system licenses are also
  442.        available; contact JP Software for more information.
  443.  
  444.        If you purchased a complete copy of 4DOS with printed manual from
  445.        a software dealer, your copy came with a yellow registration
  446.        card.  Return this card promptly to JP Software to ensure you
  447.        are registered with us, and to receive technical support and
  448.        notices of future upgrades.  If you purchased 4DOS directly from
  449.        JP Software and paid the full $35 or $50 fee, you are already
  450.        registered, and no registration card is necessary.
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        ii 
  465.  
  466.   4DOS License Agreement
  467.  
  468.        (1)  Copyright:  The 4DOS program and all other programs and
  469.        documentation distributed or shipped with it are Copyright 1988 -
  470.        1991, Rex C. Conn and JP Software Inc., or are distributed
  471.        under license to JP Software Inc., and are protected by U.S. and
  472.        international copyright law.  In the rest of this document, this
  473.        collection of programs is referred to simply as "4DOS".  You are
  474.        granted a license to use your copy of 4DOS only under the terms
  475.        and conditions specified in this license agreement.
  476.  
  477.        (2)  Definitions:  4DOS is distributed in two forms.  A
  478.        "registered" copy of 4DOS is a copy distributed on diskette,
  479.        purchased from JP Software or from a dealer, and which includes
  480.        a serial number and the legend "licensed" or "registered" in the
  481.        program sign-on message and on the diskette label.  A "shareware"
  482.        copy of 4DOS is a copy distributed on diskette or via an
  483.        electronic bulletin board, on-line service, or other electronic
  484.        means, obtained from a shareware disk vendor, or obtained from
  485.        another individual, and which displays the legend "shareware" in
  486.        the program sign-on message, and in most cases on the diskette
  487.        label as well (if applicable).  Throughout this document the term
  488.        "JP Software" refers to JP Software Inc., a Massachusetts
  489.        corporation.
  490.  
  491.        (3)  Shareware Copies:  Shareware copies of 4DOS are distributed
  492.        to allow you to try the program before you pay for it.  They are
  493.        Copyright 1988 - 1991, Rex C. Conn and JP Software Inc., and do
  494.        not constitute "free" or "public domain" software.  You may use a
  495.        shareware copy of 4DOS at no charge for a trial period of up to
  496.        21 days.  If you wish to continue using 4DOS after that period,
  497.        you must purchase a registered copy.  If you choose not to
  498.        purchase a registered copy, you must stop using 4DOS, though you
  499.        may keep copies and pass them along to others.
  500.  
  501.        (4)  Registered Copies:  Registered copies of 4DOS are
  502.        distributed to those who have purchased them.  Your registered
  503.        copy of 4DOS may only be used on the number of computers
  504.        specified on the diskette label and program sign-on screen.
  505.  
  506.        (5)  Use of One Copy on Two Computers:  If you have a registered
  507.        copy of 4DOS which is licensed for use on a single computer, you
  508.        may install it on two computers used at two different locations
  509.        (for example, at work and at home), provided there is no
  510.        possibility that the two computers will be in use at the same
  511.        time, and provided that you yourself have purchased 4DOS, or if
  512.        4DOS was purchased by your employer, that you have your
  513.        employer's explicit permission to install 4DOS on two systems as
  514.        described in this paragraph.  The right to install one copy of
  515.        4DOS on two computers is limited to copies originally licensed
  516.        for use on a single computer, and may not be used to expand the
  517.        number of systems covered under a multi-system license.
  518.  
  519.  
  520.  
  521.  
  522.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       iii 
  523.  
  524.        (6)  Use of 4DOS on Networks or Multiple Systems:  You may
  525.        install your registered copy of 4DOS on a computer attached to a
  526.        network, or remove it from one computer and install it on a
  527.        different one, provided there is no possibility that your copy
  528.        will be used by more users than it is licensed for.  A "user" is
  529.        defined as one keyboard which is connected to a computer on which
  530.        4DOS is installed, regardless of whether or not the user of the
  531.        keyboard is aware of the installation or use of 4DOS in the
  532.        system.
  533.  
  534.        (7) Making Copies:  You may copy any version of 4DOS for normal
  535.        backup purposes, and you may give copies of the shareware version
  536.        to other individuals, which they may also use and copy subject to
  537.        the terms of this agreement.  If you copy the shareware version
  538.        of 4DOS for others, you must include all of the files distributed
  539.        with it, including this one.  You may not give copies of the
  540.        registered version to any other person for any purpose, and you
  541.        may not make any copies of the printed and bound 4DOS manual
  542.        without explicit written permission from JP Software.
  543.  
  544.        (8) Distribution Restrictions:  You may NOT distribute 4DOS other
  545.        than through individual copies of the shareware version passed to
  546.        friends and associates for their individual use.  Specifically,
  547.        you may not place 4DOS or any part of the 4DOS package in any
  548.        user group or commercial library, or distribute it with any other
  549.        product or as an incentive to purchase any other product, without
  550.        express written permission from JP Software, and you may not
  551.        distribute for a fee, or in any way sell copies of 4DOS or any
  552.        part of the 4DOS package.  However if you are a shareware disk
  553.        vendor approved by the Association of Shareware Professionals (ASP),
  554.        or a non-profit, tax-exempt user group, you may place 4DOS in your
  555.        library without prior written permission, provided you notify JP
  556.        Software within 15 days of doing so; and for shareware disk vendors,
  557.        provided your application has been fully approved in writing by the
  558.        ASP, and is not simply submitted or awaiting review.
  559.  
  560.        (9)  Use of 4DOS:  4DOS is a powerful program.  While we have
  561.        attempted to build in reasonable safeguards, if you do not use
  562.        4DOS properly you may destroy files or cause other damage to your
  563.        computer software and data.  You assume full responsibility for
  564.        the selection and use of 4DOS to achieve your intended results.
  565.        As stated below, JP Software limits its warranty to replacement
  566.        of a defective program diskette or manual.
  567.  
  568.        (10) LIMITED WARRANTY:  JP Software warrants to owners of
  569.        registered copies of 4DOS that the software will operate in
  570.        accordance with the description given in the documentation, and
  571.        that the diskette and manual will be free of physical defects
  572.        which interfere with normal use.  BOOT.SYS and the software on
  573.        the 4DOS Utility Disk which was not created by JP Software,
  574.        as stated in the documentation provided on the disk, is not
  575.        warranted to operate in accordance with its documentation, and
  576.        is sold AS-IS AND WITHOUT WARRANTY OF ANY KIND BY JP SOFTWARE.
  577.        For a period of 90 days from the date of your purchase of 4DOS,
  578.  
  579.  
  580.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        iv 
  581.  
  582.        JP Software will, at its sole option and subject to the restrictions
  583.        above and below, repair or replace any defective item(s), or refund
  584.        the purchase price of any diskette and/or manual and/or any other
  585.        parts or components of 4DOS found to be defective, if such defect
  586.        is the fault of JP Software and not the result of misuse or
  587.        abuse.  Such a refund, repair, or replacement shall be your sole
  588.        remedy for any defects, program error(s), or documentation
  589.        error(s).  In no event shall JP Software be responsible for any
  590.        other costs or damages whatsoever due to errors in usage or your
  591.        failure to read, understand, or follow instructions in the
  592.        documentation.  JP SOFTWARE MAKES NO OTHER WARRANTIES, EXPRESS
  593.        OR IMPLIED, INCLUDING WITHOUT LIMITATION THE WARRANTIES OF
  594.        MERCHANTABILITY AND OF FITNESS FOR A PARTICULAR PURPOSE.  JP
  595.        Software's warranty is expressly limited to the cost of
  596.        replacement of any defective diskette or other part.
  597.  
  598.        (11)  Satisfaction Guarantee:  If you are dissatisfied with a
  599.        registered copy of 4DOS for any reason (whether or not you find a
  600.        software error or defect), you may return the entire package at
  601.        any time up to 90 days after purchase for a full refund of your
  602.        original registration fee.
  603.  
  604.  
  605.  
  606.  
  607.  
  608.  
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618.  
  619.  
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.   4DOS Reference Manual         Copyright 1991, JP Software Inc.         v 
  639.  
  640.  
  641.   Technical Support
  642.  
  643.        Technical support for 4DOS is available to registered users.  If
  644.        you are not a registered user, we will provide you with
  645.        assistance to install a shareware copy of 4DOS and evaluate it
  646.        during the 21 day evaluation period, but we cannot provide
  647.        continuing support beyond that until you purchase 4DOS.
  648.  
  649.        The best way to contact us for support is by modem, in one of the
  650.        following public 4DOS support conferences.  The numbers in
  651.        parentheses indicate the usual delay, in days, to receive a reply
  652.        to a message.
  653.  
  654.        CompuServe / PCMagNet:  Primary support is via the JP Software
  655.        section of the CompuServe PCVENB forum (GO PCVENB) (1 day).  We
  656.        also monitor the CompuServe CONSULT and IBMSYS forums, and the
  657.        PCMagNet UTILFORUM (2-5 days).
  658.  
  659.        Bulletin Boards:  Primary support is via the 4DOS conferences on
  660.        the Channel 1 BBS, Boston, MA, 617-354-8873 (1-3 days).  Additional
  661.        support is available from many local BBSes via the 4DOS conferences
  662.        on the InterLink, PC Relay, FidoNet, and SmartNet BBS Networks (3-5
  663.        days).  Please note that Channel 1 is an independent bulletin board
  664.        which has agreed to serve as a home base for 4DOS support, but is
  665.        not owned or operated by JP Software.
  666.  
  667.        BIX:  Support is available via the ibm.dos conference, topic 4DOS
  668.        (3-5 days).
  669.  
  670.        In addition, you can contact JP Software for support by mail,
  671.        telephone, fax, or electronic mail.  Addresses and phone numbers
  672.        are listed on the first page of this manual.
  673.  
  674.        We prefer support via one of the electronic services listed
  675.        above, or via electronic mail, as it allows correspondence at
  676.        convenient times regardless of time zones and work schedules, and
  677.        it provides a record of the communication.  However, telephone
  678.        and fax support are also provided to those users who do not have a
  679.        modem or who need an quick response.
  680.  
  681.  
  682.  
  683.  
  684.  
  685.  
  686.  
  687.  
  688.  
  689.  
  690.  
  691.  
  692.  
  693.  
  694.  
  695.  
  696.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        vi 
  697.  
  698.  
  699.   4DOS Features
  700.  
  701.        4DOS is a complete replacement for COMMAND.COM, the command
  702.        processor provided with MS-DOS or PC-DOS.  (References in this
  703.        manual to MS-DOS also apply to PC-DOS.)  4DOS is compatible with
  704.        MS-DOS versions 2.0 to 4, and the OS/2 DOS compatibility box, and
  705.        adds many enhancements to your MS-DOS prompt, including:
  706.  
  707.          Minimal Memory Usage
  708.  
  709.             4DOS requires less than 4K of your precious RAM for its
  710.             resident portion (less than 1K with XMS swapping!), and can
  711.             use EMS, XMS, or disk for swapping its transient portion.
  712.  
  713.          Fast Batch Files
  714.  
  715.             4DOS 3.0 adds a new batch file extension (.BTM, "batch to
  716.             memory") that is compatible with 99% of your existing batch
  717.             files, but runs several times faster.
  718.  
  719.          Executable Extensions
  720.  
  721.             In addition to the normal executable file extensions (.COM,
  722.             .EXE, .BAT, and .BTM), 4DOS allows you to define additional
  723.             extensions and the programs they should invoke.  For
  724.             example, entering a document name could automatically invoke
  725.             your word processor.
  726.  
  727.          On-line Help
  728.  
  729.             4DOS provides help for all of its internal commands, as well
  730.             as the MS-DOS external commands.  You can get help by
  731.             pressing the F1 key at the command prompt.  The 4DOS help
  732.             facility is extensible, so you can add help for your own
  733.             programs.  (Modifications to the help facility require the
  734.             4DOS utility disk, which contains the source text and help
  735.             file compiler.)
  736.  
  737.          Command Line Editing
  738.  
  739.             4DOS provides command line editing, including insert and
  740.             delete, and full cursor key support.  4DOS also offers
  741.             interactive expansion of wildcard filenames on the command
  742.             line.
  743.  
  744.  
  745.  
  746.  
  747.  
  748.  
  749.  
  750.  
  751.  
  752.  
  753.  
  754.   4DOS Reference Manual         Copyright 1991, JP Software Inc.         1 
  755.  
  756.  
  757.          Command History
  758.  
  759.             4DOS lets you view, search, modify, and reexecute your
  760.             previous commands.  The commands are saved in memory, and
  761.             can be recalled with the cursor keys.  The command history
  762.             list size is user-defined, from 512 to 8192 characters.
  763.  
  764.          Flexible File Wildcards
  765.  
  766.             4DOS offers more flexible wildcards than COMMAND.COM.  For
  767.             example, you can display all the files that have a "2"
  768.             anywhere in their filename by entering:
  769.  
  770.               dir *2*.*
  771.  
  772.          File Descriptions
  773.  
  774.             4DOS allows you to provide descriptions (up to 40
  775.             characters) for each of your files and directories.  The
  776.             descriptions are displayed with the filenames when you use
  777.             the DIR or SELECT commands.  The description goes with a
  778.             file when you COPY, ERASE, MOVE, or RENAME it.
  779.  
  780.          Multiple Commands on a Single Line
  781.  
  782.             You can enter several commands on a line by separating them
  783.             with a ^ (caret), or other user-defined character.
  784.  
  785.          Expanded and Editable Environment
  786.  
  787.             4DOS provides a user-defined environment size from 512 to
  788.             32000 characters.  You can interactively edit environment
  789.             entries with the ESET command.
  790.  
  791.          Environment Variables
  792.  
  793.             Environment variables allow you to associate a string of
  794.             characters with a variable name, substituting that string
  795.             when the name is used.  4DOS provides a number of predefined
  796.             variables, including system date and time, current
  797.             directory, and default disk, and "variable functions," for
  798.             returning substrings, the parts of a filename (path, name,
  799.             extension), etc.
  800.  
  801.  
  802.  
  803.  
  804.  
  805.  
  806.  
  807.  
  808.  
  809.  
  810.  
  811.  
  812.   4DOS Reference Manual         Copyright 1991, JP Software Inc.         2 
  813.  
  814.  
  815.          Aliases
  816.  
  817.             Aliases allow you to rename or reconfigure commands (for
  818.             example, to pass default parameters to a command, or to give
  819.             MS-DOS the look and feel of a different operating system),
  820.             or to define a new command as a combination of several other
  821.             commands.  Aliases support batch file-like arguments (%1,
  822.             %2, etc.) and environment variables, so when combined with
  823.             the multiple commands feature, they act as very fast batch
  824.             files.
  825.  
  826.          Expanded Command Line
  827.  
  828.             4DOS expands the MS-DOS command input line from 127 to 255
  829.             characters for internal commands.  (Because MS-DOS truncates
  830.             the command line for external commands to 127 characters,
  831.             4DOS makes the full command line available to your programs
  832.             through the CMDLINE environment variable.)
  833.  
  834.          Conditional Commands
  835.  
  836.             4DOS includes two new command line operators: || (OR) and &&
  837.             (AND).  They allow you to control the execution of
  838.             subsequent commands based on the result of the previous
  839.             command.
  840.  
  841.          Additional Redirection Options
  842.  
  843.             In addition to redirection of standard input and standard
  844.             output, 4DOS supports redirection of standard error, and the
  845.             option to prevent overwriting existing files.  4DOS also
  846.             provides TEE and Y "pipe fittings."
  847.  
  848.          EGA/VGA Support
  849.  
  850.             4DOS supports Monochrome, CGA, EGA and VGA displays with any
  851.             number of lines and columns per screen.
  852.  
  853.          Networks
  854.  
  855.             4DOS supports MS-DOS compatible networks, including 3Com 3+
  856.             and Novell Netware.
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.  
  864.  
  865.  
  866.  
  867.  
  868.  
  869.  
  870.   4DOS Reference Manual         Copyright 1991, JP Software Inc.         3 
  871.  
  872.  
  873.   New and Enhanced Commands
  874.  
  875.        4DOS provides many new internal commands, and new options for
  876.        existing commands.  Most 4DOS commands can take multiple
  877.        arguments.  For example, you can delete several files with a
  878.        single DEL command:
  879.  
  880.          del *.bak test.wks oldfile.txt
  881.  
  882.        You can also copy several files with a single COPY command (the
  883.        target directory here is a:\):
  884.  
  885.          copy *.wks memo.doc *.c a:\
  886.  
  887.        The following list is intended to give you a sampling of some of
  888.        the new and enhanced commands.  See the Command Reference Guide
  889.        for full details.
  890.  
  891.  
  892.          ALIAS / UNALIAS
  893.  
  894.             Define aliases for commonly used commands, allowing you to
  895.             execute a complex series of commands with a few keystrokes.
  896.  
  897.          ATTRIB
  898.  
  899.             Display or change the file attributes (read-only, hidden,
  900.             system, and archive) for the specified files and/or
  901.             directories.
  902.  
  903.          CDD
  904.  
  905.             Change the default drive and directory.
  906.  
  907.          COLOR
  908.  
  909.             Set the screen foreground and background colors.
  910.  
  911.          COPY
  912.  
  913.             COPY includes new switches for copying only updated files
  914.             (where the source is newer than the target), and to prompt
  915.             for confirmation before overwriting existing files.
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.   4DOS Reference Manual         Copyright 1991, JP Software Inc.         4 
  929.  
  930.  
  931.          DESCRIBE
  932.  
  933.             Add 40-character descriptions to filenames.  The
  934.             descriptions are displayed when using DIR and SELECT.
  935.  
  936.          DIR
  937.  
  938.             Display the disk directory with a wide variety of options,
  939.             including 1, 2, 4, or 5 column display; sorted by name,
  940.             extension, description, size, or date/time; display
  941.             subdirectories; display file attributes; and display
  942.             subtotals only.
  943.  
  944.          ESET
  945.  
  946.             Interactively edit environment variables and aliases.
  947.  
  948.          EXCEPT
  949.  
  950.             Execute a command except on the specified file(s).
  951.  
  952.          FREE
  953.  
  954.             Display the total and free disk space for the specified
  955.             drive(s).
  956.  
  957.          GLOBAL
  958.  
  959.             Execute a command in the current directory and all of its
  960.             subdirectories.
  961.  
  962.          HELP
  963.  
  964.             Display a pop-up help window for 4DOS internal commands and
  965.             MS-DOS external commands.
  966.  
  967.          HISTORY
  968.  
  969.             Display, clear or load the command history list.
  970.  
  971.          LIST
  972.  
  973.             Display a file on the screen.  LIST provides forward and
  974.             backward paging, vertical and horizontal scrolling, text
  975.             search, and printing.
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.   4DOS Reference Manual         Copyright 1991, JP Software Inc.         5 
  987.  
  988.  
  989.          LOG
  990.  
  991.             Keep a disk log of each command executed, with the date and
  992.             time.
  993.  
  994.          MEMORY
  995.  
  996.             Display the amount of total and available DOS, expanded,
  997.             XMS, and extended memory, and environment space.
  998.  
  999.          MOVE
  1000.  
  1001.             Move files between directories and/or drives, and optionally
  1002.             prompt before overwriting existing files.
  1003.  
  1004.          PUSHD / POPD / DIRS
  1005.  
  1006.             Use a "directory stack" to change directories, perform some
  1007.             work, and then return to the original directory.
  1008.  
  1009.          RENAME
  1010.  
  1011.             In addition to renaming files, 4DOS also allows you to
  1012.             rename files to another directory, and to rename
  1013.             directories.
  1014.  
  1015.          SELECT
  1016.  
  1017.             Perform a command on selected files (using point-and-shoot
  1018.             selection).
  1019.  
  1020.          SETDOS
  1021.  
  1022.             Configure the 4DOS internal parameters, including the
  1023.             default line editing mode (insert or overstrike), the
  1024.             default batch echo mode, the compound command character, the
  1025.             escape character, screen size, and cursor shape.
  1026.  
  1027.          TIMER
  1028.  
  1029.             A system stopwatch for timing events, including split times.
  1030.  
  1031.  
  1032.  
  1033.  
  1034.  
  1035.  
  1036.  
  1037.  
  1038.  
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.   4DOS Reference Manual         Copyright 1991, JP Software Inc.         6 
  1045.  
  1046.  
  1047.   Enhanced Batch Processor
  1048.  
  1049.        The batch processor in 4DOS is compatible with batch files
  1050.        written for COMMAND.COM, and includes several new and enhanced
  1051.        commands to make batch file programming easier and more powerful,
  1052.        including:
  1053.  
  1054.  
  1055.          BEEP
  1056.  
  1057.             Beep the speaker at the specified frequency and for the
  1058.             specified duration.
  1059.  
  1060.          CALL
  1061.  
  1062.             Execute nested batch files without loading a secondary
  1063.             copy of the command processor.
  1064.  
  1065.          CANCEL
  1066.  
  1067.             Terminate nested batch file processing.
  1068.  
  1069.          DELAY
  1070.  
  1071.             Wait for the specified period of time before continuing
  1072.             batch processing.
  1073.  
  1074.          DRAWBOX / DRAWHLINE / DRAWVLINE
  1075.  
  1076.             Draw boxes, horizontal, and vertical lines in single or
  1077.             double widths, in your choice of colors.  These commands
  1078.             automatically make connectors when crossing other lines.
  1079.  
  1080.          GOSUB / RETURN
  1081.  
  1082.             Call subroutines within a batch file.
  1083.  
  1084.          IF
  1085.  
  1086.             Many new comparison tests, (including less than, greater
  1087.             than, etc), and tests for memory, disk, and display type.
  1088.  
  1089.  
  1090.  
  1091.  
  1092.  
  1093.  
  1094.  
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100.  
  1101.  
  1102.   4DOS Reference Manual         Copyright 1991, JP Software Inc.         7 
  1103.  
  1104.  
  1105.          IFF / THEN / ELSEIFF / ELSE / ENDIFF
  1106.  
  1107.             Allows nested IF / THEN / ELSE tests in batch files and
  1108.             aliases, and supports all of the new IF tests (see above).
  1109.  
  1110.          INPUT / INKEY
  1111.  
  1112.             Input variables from the keyboard while in a batch
  1113.             file, with an optional timeout period.
  1114.  
  1115.          KEYSTACK
  1116.  
  1117.             Send keystrokes to a program, as if entered from the
  1118.             keyboard.
  1119.  
  1120.          QUIT
  1121.  
  1122.             Exit the current batch file.
  1123.  
  1124.          SCREEN
  1125.  
  1126.             Position the cursor and (optionally) display text.
  1127.  
  1128.          SCRPUT
  1129.  
  1130.             Position the cursor and display text in the specified
  1131.             colors.
  1132.  
  1133.          SETLOCAL / ENDLOCAL
  1134.  
  1135.             Define a local environment within a batch file, saving the
  1136.             original environment, disk, and directory, and restoring
  1137.             them when finished.
  1138.  
  1139.          SHIFT
  1140.  
  1141.             Optionally specify how many positions to shift,
  1142.             including reverse SHIFTs.
  1143.  
  1144.          TEXT / ENDTEXT
  1145.  
  1146.             Display a block of text.
  1147.  
  1148.  
  1149.  
  1150.  
  1151.  
  1152.  
  1153.  
  1154.  
  1155.  
  1156.  
  1157.  
  1158.  
  1159.  
  1160.   4DOS Reference Manual         Copyright 1991, JP Software Inc.         8 
  1161.  
  1162.  
  1163.   Installation
  1164.  
  1165.        4DOS is written for the IBM PC, PC/XT, PC/AT, PS/2 (all models),
  1166.        and compatibles.  It requires MS-DOS 2 or above (MS-DOS 3.1 or
  1167.        above is recommended), and uses less than 4K of RAM in swapping
  1168.        mode, or about 70K in resident mode.
  1169.  
  1170.        If you are new to 4DOS, read through this section until you get
  1171.        to "Automatic Installation."  If you have a diskette copy of
  1172.        4DOS, you can follow the automatic installation procedure, and
  1173.        come back later to read the section on manual installation and
  1174.        configuration.
  1175.  
  1176.        If you would like to try out 4DOS before fully installing it, see
  1177.        the section Test Driving 4DOS.
  1178.  
  1179.        If you are an experienced 4DOS user, do not have 4DOS on
  1180.        diskette, or prefer manual installation for any other reason,
  1181.        read through this section before installing 4DOS.  See the Quick
  1182.        Start section for brief instructions for experienced users on how
  1183.        to install 4DOS.
  1184.  
  1185.   4DOS Files
  1186.  
  1187.        The files listed below are part of 4DOS.  Depending on where you
  1188.        obtained your copy, you may find the files in a compressed form,
  1189.        usually in a file with the extension .ZIP or .ARC.  These files
  1190.        may change from time to time.  See the file README.DOC for up to
  1191.        date information on which files are included with your copy of
  1192.        4DOS.
  1193.  
  1194.        INSTALL.BAT*   The automatic installation batch file.  Note that
  1195.                       INSTALL.BAT will only work with copies of 4DOS
  1196.                       distributed on diskette.
  1197.  
  1198.        4DOS.COM       The 4DOS shell loader and swapper.
  1199.  
  1200.        4DOS88.EXE     Replaces COMMAND.COM as the default MS-DOS command
  1201.                       processor on any PC compatible system.
  1202.  
  1203.        4DOS286.EXE    A version of 4DOS optimized for 80186, 80286,
  1204.                       80386, 80486, V20 and V30 processors.  4DOS286
  1205.                       is slightly smaller and faster than 4DOS88.
  1206.  
  1207.  
  1208.  
  1209.  
  1210.  
  1211.  
  1212.  
  1213.  
  1214.  
  1215.  
  1216.  
  1217.  
  1218.   4DOS Reference Manual         Copyright 1991, JP Software Inc.         9 
  1219.  
  1220.  
  1221.        4DOS.DOC         The 4DOS manual.
  1222.  
  1223.        KEYSTACK.SYS     This device driver provides the support for the
  1224.                         4DOS KEYSTACK command.
  1225.  
  1226.        HELP.EXE         This is the on-line help program for 4DOS.  It
  1227.                         provides help for all of the internal 4DOS
  1228.                         commands, and for the external MS-DOS commands.
  1229.  
  1230.        DOS.HLP          The text file for HELP.EXE.
  1231.  
  1232.        ALIASES          Sample predefined 4DOS aliases.
  1233.  
  1234.        PKUNZIP.EXE*     Program used to uncompress the .ZIP files.
  1235.  
  1236.        PKUNZIP.DOC*     Documentation for PKUNZIP.EXE.
  1237.  
  1238.        COMPAT.DOC       Compatibility notes -- look here if you have
  1239.                         trouble getting another program running with
  1240.                         4DOS.
  1241.  
  1242.        README.DOC       Last-minute revisions and bug reports.
  1243.  
  1244.        * Included only with diskette copies of 4DOS.
  1245.  
  1246.   Compatibility
  1247.  
  1248.        Compatibility information varies from release to release of both
  1249.        4DOS and other products.  See Appendix E - Troubleshooting 4DOS
  1250.        for general usage notes and troubleshooting tips.  The file
  1251.        COMPAT.DOC (distributed with 4DOS) contains the latest
  1252.        compatibility information available to us, along with information
  1253.        on how to address known compatibility problems.
  1254.  
  1255.        If the information in Appendix E and COMPAT.DOC doesn't solve
  1256.        your problem, contact JP Software directly for technical
  1257.        support.
  1258.  
  1259.  
  1260.  
  1261.  
  1262.  
  1263.  
  1264.  
  1265.  
  1266.  
  1267.  
  1268.  
  1269.  
  1270.  
  1271.  
  1272.  
  1273.  
  1274.  
  1275.  
  1276.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        10 
  1277.  
  1278.  
  1279.   Test Driving 4DOS
  1280.  
  1281.        While 4DOS is normally installed as your system's primary command
  1282.        processor, you can try it out by running it just like any other
  1283.        program.  This allows you to explore the features and advantages
  1284.        of 4DOS before doing a full installation.
  1285.  
  1286.        To try 4DOS, copy the files 4DOS.COM and 4DOS88.EXE to your
  1287.        system disk.  If the copy of 4DOS you received has these files
  1288.        compressed, use the following command to decompress them (this
  1289.        example assumes the files are stored in the compressed file
  1290.        A:\4DOS30.ZIP, and you are decompressing them with the PKUNZIP
  1291.        program onto the root directory of drive C)
  1292.  
  1293.             pkunzip a:\4dos30 c:\4dos.com c:\4dos88.exe
  1294.  
  1295.        You can put these files in any directory, including a separate
  1296.        4DOS directory if you like.  Change to that directory, and enter
  1297.        the command:
  1298.  
  1299.             4dos
  1300.  
  1301.        You will see the 4DOS sign-on message and a prompt.  You are now
  1302.        ready to try 4DOS!  You can return to COMMAND.COM at any time by
  1303.        typing:
  1304.  
  1305.             exit
  1306.  
  1307.        Note that the 4DOS KEYSTACK command will be unavailable because
  1308.        it requires the KEYSTACK.SYS device driver to be installed.
  1309.        Installation of KEYSTACK.SYS is described in the Manual
  1310.        Installation section.
  1311.  
  1312.        The 4DOS HELP command will also be unavailable.  To try it out,
  1313.        decompress and/or copy the files HELP.EXE and DOS.HLP to a
  1314.        directory included in your PATH statement.  Then type HELP or
  1315.        press F1 at the 4DOS prompt to access the 4DOS online help
  1316.        facility.
  1317.  
  1318.        There are a few situations where you will need to make some
  1319.        changes in the method described above.  If your system does not
  1320.        have a hard disk, EMS, or XMS memory, use the following command
  1321.        to start 4DOS:
  1322.  
  1323.             4dos /s:n
  1324.  
  1325.        This will disable 4DOS swapping (floppy disk swapping is too slow
  1326.        to be useful).  Under these conditions 4DOS will require about
  1327.        70K of memory, instead of the under 4K required in swapping mode.
  1328.  
  1329.        If you are running network software, you can start 4DOS as above,
  1330.        but do so after your network is loaded.  If you are running a
  1331.        multitasking or task switching environment such as DESQview or
  1332.        Microsoft Windows, load 4DOS as above within a partition or
  1333.  
  1334.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        11 
  1335.  
  1336.  
  1337.        window, rather than attempting to load the operating environment
  1338.        after 4DOS has started.  (These restrictions apply only to
  1339.        testing 4DOS.  Once it is installed as the primary shell and
  1340.        configured properly for your system, they will not be necessary.)
  1341.  
  1342.   Quick Start
  1343.  
  1344.        If you are an experienced MS-DOS user, the following instructions
  1345.        will get you up and running with 4DOS.  If you have trouble or if
  1346.        these instructions don't make sense, use the automatic or manual
  1347.        installation procedures described later in this section.  These
  1348.        instructions assume you are booting from a hard disk which is
  1349.        drive C.
  1350.  
  1351.          1) Be sure you have a bootable MS-DOS floppy.
  1352.  
  1353.          2) Decompress and/or copy the files 4DOS.COM, KEYSTACK.SYS, and
  1354.             4DOS286.EXE (for 8018x/286/386/486, V20, and V30 processors)
  1355.             or 4DOS88.EXE (for 808x processors) to the root directory of
  1356.             drive C:.
  1357.  
  1358.          3) If you have a registered (non-shareware) copy of 4DOS,
  1359.             change to the root directory of drive C and run the BRAND
  1360.             program by entering "A:BRAND".  Enter the serial number from
  1361.             the diskette label, and your EXE file will be branded as a
  1362.             fully registered copy.  If you only copied one of the EXE
  1363.             files, ignore the error message about the missing EXE file.
  1364.  
  1365.          4) Decompress and/or copy the files HELP.EXE and DOS.HLP to a
  1366.             directory included in your PATH statement.
  1367.  
  1368.          5) Edit CONFIG.SYS so that it contains the following lines
  1369.             (delete any existing SHELL= line):
  1370.  
  1371.                  device=c:\keystack.sys
  1372.                  shell=c:\4dos.com /E:n /A:m /P
  1373.  
  1374.             where n is your desired environment size, and m is the
  1375.             desired alias list size (in bytes).  The default values are
  1376.             /E:512 and /A:1024.
  1377.  
  1378.          6) Reboot your system.  The system will load 4DOS (swapping to
  1379.             XMS, EMS, or disk, depending on what is available), execute
  1380.             AUTOEXEC, and return to the 4DOS prompt when AUTOEXEC is
  1381.             done.
  1382.  
  1383.          7) If you are using PROMPT commands in AUTOEXEC to transmit
  1384.             ANSI control sequences for key redefinitions, they will not
  1385.             work with 4DOS; you must use ECHO instead.  See the PROMPT
  1386.             command in the Command Reference Guide for more information.
  1387.             ANSI control sequences for the prompt itself (to set colors
  1388.             etc.) will work properly.
  1389.  
  1390.  
  1391.  
  1392.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        12 
  1393.  
  1394.  
  1395.          8) If you are explicitly setting COMSPEC in AUTOEXEC, you
  1396.             should delete this line or place a REM in front of it if you
  1397.             want to use 4DOS as your secondary shell.  4DOS will
  1398.             automatically set the COMSPEC to C:\4DOS.COM.
  1399.  
  1400.   Automatic Installation
  1401.  
  1402.        You must have a diskette version of 4DOS to use automatic
  1403.        installation.  To install 4DOS automatically from a diskette
  1404.        in drive A to a hard disk configured as drive C, insert the 4DOS
  1405.        Shareware Disk in drive A and type:
  1406.  
  1407.             a:install
  1408.  
  1409.        If you need to install from a drive other than drive A: or to a
  1410.        drive other than drive C:, use the following command:
  1411.  
  1412.             x:install x y
  1413.  
  1414.        where x is the drive containing the 4DOS shareware disk, and y is
  1415.        the drive on which you want to place the installed copy of 4DOS.
  1416.  
  1417.        INSTALL will prompt you for your desired configuration, copy the
  1418.        necessary files to your boot disk, and create some new lines for
  1419.        CONFIG.SYS.  These new lines, in the file CONFIG.4D, must be
  1420.        merged with your existing CONFIG.SYS file before rebooting your
  1421.        system to start 4DOS.
  1422.  
  1423.        NOTE:  You may want to edit the new CONFIG.SYS lines if you have
  1424.        an unusual configuration, or if you want to modify the default
  1425.        values.
  1426.  
  1427.        If you have a registered copy of 4DOS, during the installation
  1428.        process INSTALL will prompt you to insert the registered disk
  1429.        in order to "brand" your copy of 4DOS with your name and serial
  1430.        number.
  1431.  
  1432.  
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        13 
  1451.  
  1452.  
  1453.   DOS Shells Explained
  1454.  
  1455.        This section gives an overview of what "DOS shells" (as discussed
  1456.        in this manual) are, and of primary and secondary shells.  This
  1457.        information is important in understanding how to install and
  1458.        configure 4DOS.  If you already understand these concepts, go on
  1459.        to the next section.
  1460.  
  1461.        In the PC world the term shell has come to mean any program that
  1462.        gives you the capability to execute DOS commands and run
  1463.        programs.  We will use it more precisely to mean the system
  1464.        command interpreter, the program which reads your keystrokes at
  1465.        the DOS prompt and interprets them, allowing you to execute
  1466.        internal commands and run external programs.  Before 4DOS,
  1467.        virtually all PCs using DOS used COMMAND.COM as the shell.
  1468.  
  1469.        When your system is started, the last thing the system startup
  1470.        software does is to load a copy of the shell program into memory
  1471.        and give it control.  This program is called the primary or root
  1472.        shell.  It executes AUTOEXEC.BAT, displays the command line
  1473.        prompt and processes your commands.
  1474.  
  1475.        The primary shell is the program that executes most of the
  1476.        commands you enter, either as internal functions (e.g., the DIR
  1477.        command), or by loading and executing other programs (e.g., a
  1478.        word processing program).
  1479.  
  1480.        The text file CONFIG.SYS, stored in the root directory of your
  1481.        boot disk, tells MS-DOS how to start:  what device drivers to
  1482.        load, how many open files to allow, etc.  The SHELL statement in
  1483.        CONFIG.SYS determines what program is loaded as the primary
  1484.        shell.  If you don't have a SHELL statement, MS-DOS will load
  1485.        COMMAND.COM as the primary shell.  However, any properly written
  1486.        program can be loaded in place of COMMAND.COM.  This is the
  1487.        normal method for loading 4DOS.
  1488.  
  1489.        Now, suppose from inside your word processor you invoke the
  1490.        "shell to DOS" option, to execute some commands without having to
  1491.        save your files and exit first.  When the prompt comes up, you
  1492.        are running a secondary shell;  the word processor has loaded a
  1493.        shell program into memory to perform commands.  When you type the
  1494.        EXIT command, the secondary shell terminates and control is
  1495.        returned to the word processor.
  1496.  
  1497.        The same kind of sequence is used by many programs which run
  1498.        other programs or execute MS-DOS commands:  the program loads a
  1499.        copy of the command processor (a secondary shell) and passes a
  1500.        command to it to execute a command or another program.  For
  1501.        example, a hard disk manager which allows you to copy files may
  1502.        invoke a secondary shell and pass a COPY command to it to
  1503.        actually perform the copy.
  1504.  
  1505.  
  1506.  
  1507.  
  1508.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        14 
  1509.  
  1510.  
  1511.        Multitasking or task switching systems may also use secondary
  1512.        shells to load and execute the programs you specify in each of
  1513.        the windows or partitions they support. For example, DESQview
  1514.        will load a secondary shell to execute your program under some
  1515.        conditions, and will execute the program directly under other
  1516.        conditions (see the DESQview manual for details).
  1517.  
  1518.        In all of these situations, the secondary shell need not be the
  1519.        same program as the primary shell.  The two shells are completely
  1520.        independent, occupy different areas of memory, and generally have
  1521.        little interaction with each other. Both COMMAND.COM and 4DOS can
  1522.        work as primary and/or secondary shells.
  1523.  
  1524.   The COMSPEC Environment Variable
  1525.  
  1526.        A variable in the MS-DOS environment, COMSPEC, determines which
  1527.        program is loaded as the secondary shell, just as the SHELL
  1528.        command in CONFIG.SYS specifies the primary shell program.  The
  1529.        COMSPEC variable is set at startup time to point to the primary
  1530.        shell program.  It can be modified at any time with the SET
  1531.        command.  If COMSPEC does not point to a valid command processor
  1532.        (including the correct drive and directory), programs attempting
  1533.        to shell to MS-DOS will fail.
  1534.  
  1535.        In 4DOS, COMSPEC is set at system startup to d:\4DOS.COM, where
  1536.        d: represents the drive the system was started from.  In
  1537.        COMMAND.COM, COMSPEC is set to d:\COMMAND.COM.
  1538.  
  1539.        If 4DOS is your primary shell, and 4DOS.COM and 4DOS88.EXE (or
  1540.        4DOS286.EXE) are not stored in the root directory of the boot
  1541.        drive, you MUST set COMSPEC yourself in AUTOEXEC.BAT with the
  1542.        proper drive and directory for 4DOS.COM and the 4DOS EXE files.
  1543.        If COMSPEC is not set correctly, you will not be able to shell
  1544.        out to 4DOS or execute external commands from within your
  1545.        application programs.  For example, if your 4DOS.COM and
  1546.        4DOS88.EXE or 4DOS286.EXE files are in D:\BIN\4DOS, put the
  1547.        following command in AUTOEXEC.BAT:
  1548.  
  1549.          set comspec=d:\bin\4dos\4dos.com
  1550.  
  1551.        Note that COMSPEC contains only the name of the shell program.
  1552.        Any options to be passed to secondary 4DOS shells must be set
  1553.        separately in 4DSHELL (see below).
  1554.  
  1555.  
  1556.        NOTE:  A few ill-behaved programs ignore COMSPEC, and explicitly
  1557.        load COMMAND.COM as a secondary shell.  Although it is possible
  1558.        to rename 4DOS.COM to COMMAND.COM to handle most of these cases,
  1559.        we recommend you keep a copy of COMMAND.COM on your system as it
  1560.        may be needed for other purposes.
  1561.  
  1562.  
  1563.  
  1564.  
  1565.  
  1566.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        15 
  1567.  
  1568.  
  1569.        Some versions of COMMAND.COM permit specification of an alternate
  1570.        path for COMMAND.COM as an argument on the SHELL= line in
  1571.        CONFIG.SYS, and this path is used to set the COMSPEC.  This is
  1572.        not a documented feature of COMMAND.COM, and is not supported by
  1573.        4DOS.
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.  
  1591.  
  1592.  
  1593.  
  1594.  
  1595.  
  1596.  
  1597.  
  1598.  
  1599.  
  1600.  
  1601.  
  1602.  
  1603.  
  1604.  
  1605.  
  1606.  
  1607.  
  1608.  
  1609.  
  1610.  
  1611.  
  1612.  
  1613.  
  1614.  
  1615.  
  1616.  
  1617.  
  1618.  
  1619.  
  1620.  
  1621.  
  1622.  
  1623.  
  1624.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        16 
  1625.  
  1626.  
  1627.   Manual Installation and Configuration Options
  1628.  
  1629.        These instructions assume that you are installing 4DOS on a hard
  1630.        disk with drive letter C, and that you will be placing the 4DOS
  1631.        system files in the root directory of that disk.  If you need to
  1632.        place the files on another drive or directory (for example, on a
  1633.        floppy disk system), you will need to adjust the parameters.
  1634.  
  1635.        The first step in installing 4DOS is to copy the files from the
  1636.        4DOS disk or compressed file to your boot disk.  If you have a
  1637.        diskette copy of 4DOS, see the README.DOC file on the diskette
  1638.        for information on exactly how the files are stored.
  1639.  
  1640.        Copy (or decompress) the following 4DOS system files to the root
  1641.        directory of your boot disk:
  1642.  
  1643.             KEYSTACK.SYS
  1644.             4DOS.COM
  1645.             4DOS88.EXE, if your system has an 8086 or 8088 CPU (this
  1646.                applies to most PC and XT systems)
  1647.             4DOS286.EXE, if your system has an 80186, 80188, 80286,
  1648.                80386, 80486, or NEC V20 or V30 CPU (this applies to all
  1649.                AT and 386/486 systems, and some other systems with
  1650.                accelerator boards or replacement CPU chips)
  1651.  
  1652.        If you are in doubt about your CPU type, use 4DOS88.EXE until you
  1653.        can determine the CPU type definitively (see the _CPU variable in
  1654.        Environment Variables).  4DOS88.EXE will work with all PCs.
  1655.  
  1656.        Copy (or decompress) the files HELP.EXE and DOS.HLP to a
  1657.        directory included in your path (i.e. one listed in the PATH
  1658.        statement in AUTOEXEC.BAT).
  1659.  
  1660.        Copy (or decompress) the  files 4DOS.DOC, README.DOC, COMPAT.DOC,
  1661.        and ALIASES to any directory you choose, if you wish to have them
  1662.        available on-line permanently, or temporarily in order to print
  1663.        them.
  1664.  
  1665.  
  1666.  
  1667.  
  1668.  
  1669.  
  1670.  
  1671.  
  1672.  
  1673.  
  1674.  
  1675.  
  1676.  
  1677.  
  1678.  
  1679.  
  1680.  
  1681.  
  1682.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        17 
  1683.  
  1684.  
  1685.   4DOS Memory Usage
  1686.  
  1687.        When installing 4DOS you must decide whether you want to run in
  1688.        swapping mode or memory-resident mode.
  1689.  
  1690.        Swapping mode is recommended for most users.  In this mode a
  1691.        small part of 4DOS (the resident portion, less than 4K in size,
  1692.        from the file 4DOS.COM) resides permanently in low memory.  The
  1693.        remainder of 4DOS (the transient portion, about 70K in size, from
  1694.        the file 4DOS88.EXE or 4DOS286.EXE), resides at the end of normal
  1695.        MS-DOS memory, and is swapped out to XMS, EMS, or disk while your
  1696.        applications are running.  This swapping is very fast, especially
  1697.        if XMS or EMS memory or a RAM disk is available, and it allows
  1698.        you to have the power of 4DOS, yet keep most of your memory
  1699.        available for applications.
  1700.  
  1701.        COMMAND.COM uses a similar approach to keep its resident portion
  1702.        in low memory and its transient portion at the end of DOS memory.
  1703.        It does not retain information while applications are running, so
  1704.        it does not use a swap area.  The resident portion of COMMAND.COM
  1705.        is slightly larger than that of 4DOS.  The transient portion is
  1706.        smaller (about 35K) as COMMAND.COM has far fewer features and
  1707.        capabilities than 4DOS.
  1708.  
  1709.        The resident portion of 4DOS takes about 10K of memory to load
  1710.        (later reduced to less than 4K), and the transient portion 70K,
  1711.        so you must have about 80K of free memory to load 4DOS in
  1712.        swapping mode (82K for 4DOS88).
  1713.  
  1714.        COMMAND.COM requires about 40K of free memory to load.  If you
  1715.        find you are able to load COMMAND.COM as the secondary shell from
  1716.        a particular program, but are unable to load 4DOS, it is probably
  1717.        because you have more than 40K but less than 80K of free memory,
  1718.        or because COMSPEC and/or 4DSHELL (see below) are set
  1719.        incorrectly.
  1720.  
  1721.        Memory resident mode is recommended only on systems (older PCs
  1722.        and some laptops) which have no hard disk, XMS or EMS memory, or
  1723.        RAM disk.  On such systems the only swap area available is a
  1724.        floppy disk, which is unacceptably slow.  In memory-resident
  1725.        mode, all of 4DOS is loaded permanently into low memory; the
  1726.        memory required is about 70K for 4DOS286.EXE, or 72K for
  1727.        4DOS88.EXE.
  1728.  
  1729.  
  1730.  
  1731.  
  1732.  
  1733.  
  1734.  
  1735.  
  1736.  
  1737.  
  1738.  
  1739.  
  1740.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        18 
  1741.  
  1742.  
  1743.   Setting up CONFIG.SYS
  1744.  
  1745.        In order to install 4DOS you must modify the CONFIG.SYS file.
  1746.        First, create a SHELL command to tell MS-DOS to load 4DOS as the
  1747.        command processor.  The format of the command is:
  1748.  
  1749.             SHELL=d:\path\filename [options]
  1750.  
  1751.        where d:\path is the drive and directory where the primary shell
  1752.        program is stored, filename is the full name of that program, and
  1753.        [options] is any option or parameter values for 4DOS.  (See 4DOS
  1754.        Startup Options.)  The options are passed to the program just as
  1755.        if they had been typed on the command line.
  1756.  
  1757.        When loading 4DOS, the filename part of the command should be
  1758.        4DOS.COM.  For example, the simplest SHELL command which will
  1759.        load 4DOS properly is:
  1760.  
  1761.             SHELL=C:\4DOS.COM /P
  1762.  
  1763.        This loads 4DOS in swapping mode (4DOS determines the optimal
  1764.        swapping method), with default sizes for the environment, alias
  1765.        list, and history list.  The /P tells 4DOS it is the primary
  1766.        shell.
  1767.  
  1768.        Use an editor to edit or create your CONFIG.SYS file, and set up
  1769.        your SHELL command as shown above, along with any additional
  1770.        options you need (see next section).  If you already have a SHELL
  1771.        command for COMMAND.COM, remove it.  Examples of SHELL commands
  1772.        for different systems are given in 4DOS Startup Options.
  1773.  
  1774.        CAUTION:  Due to a bug in all versions of MS-DOS and PC-DOS, the
  1775.        SHELL command in CONFIG.SYS may not contain more than 33
  1776.        characters following the name of the shell program (i.e.,
  1777.        beginning with the first character of the [options] in the
  1778.        example above).  If the line is too long, the options will not be
  1779.        passed properly to 4DOS, and a variety of errors can occur.  You
  1780.        can usually set all of the 4DOS options without exceeding this
  1781.        limit, provided you keep 4DOS88.EXE / 4DOS286.EXE in the root
  1782.        directory of your boot disk.  If you need a longer SHELL command
  1783.        line, 4DOS provides the @filename option (see 4DOS Startup
  1784.        Options).
  1785.  
  1786.        In addition to the shell command, if you want to use the 4DOS
  1787.        KEYSTACK command (see Command Reference), you must place a line
  1788.        in CONFIG.SYS to load the 4DOS KEYSTACK device driver.  This line
  1789.        should read:
  1790.  
  1791.             device=c:\keystack.sys
  1792.  
  1793.  
  1794.  
  1795.  
  1796.  
  1797.  
  1798.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        19 
  1799.  
  1800.  
  1801.   Loading 4DOS Under DOS 2
  1802.  
  1803.        While we recommend the use of MS-DOS 3.1 or above, 4DOS can be
  1804.        used with MS-DOS 2.  In MS-DOS 2, certain functions require
  1805.        COMMAND.COM to be loaded as the primary command processor, so you
  1806.        must load COMMAND.COM first, then load 4DOS.  Assuming all files
  1807.        are in the root directory of drive C, the SHELL command to do
  1808.        this is:
  1809.  
  1810.             shell=c:\command.com /c 4DOS [options]
  1811.  
  1812.        The [options] are defined in 4DOS Startup Options, and should
  1813.        include /P even though 4DOS is not (technically) the primary
  1814.        shell.  If /P is left off, AUTOEXEC.BAT will not be run.
  1815.  
  1816.        Note that due to the /C 4DOS on the SHELL line, fewer options can
  1817.        be used before running into the 33-character limit discussed
  1818.        earlier.  For this reason the "@filename" option may be necessary
  1819.        when loading 4DOS under DOS 2.
  1820.  
  1821.   Loading 4DOS in the OS/2 DOS Compatibility Box
  1822.  
  1823.        4DOS can be loaded in the OS/2 MS-DOS compatibility box, but you
  1824.        will be limited to either disk swapping or memory resident modes.
  1825.        (The compatibility box does not support EMS or XMS.)
  1826.  
  1827.  
  1828.  
  1829.  
  1830.  
  1831.  
  1832.  
  1833.  
  1834.  
  1835.  
  1836.  
  1837.  
  1838.  
  1839.  
  1840.  
  1841.  
  1842.  
  1843.  
  1844.  
  1845.  
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.  
  1853.  
  1854.  
  1855.  
  1856.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        20 
  1857.  
  1858.  
  1859.   4DOS Startup Options
  1860.  
  1861.        This section describes the options that can be included on the
  1862.        SHELL command in CONFIG.SYS, and/or used for secondary shells
  1863.        (see 4DSHELL).  The same options can also be used when you start
  1864.        4DOS in a window of a multitasking or task switching environment
  1865.        such as DESQview or Windows, or from the command line or a batch
  1866.        file.
  1867.  
  1868.        @d:\path\filename
  1869.             Stop processing input from the command line, and switch to
  1870.             the specified file.  Any characters on the line after this
  1871.             option will be ignored.  The file may contain any number of
  1872.             lines specifying additional 4DOS options, and may be up to a
  1873.             total of 255 characters long.  This option allows you to get
  1874.             around the 33-character limit on options in the SHELL command
  1875.             by placing 4DOS options in a separate file.
  1876.  
  1877.        /A:n
  1878.             Set the alias list size.  The range of allowable alias list
  1879.             sizes for all shells is 256 - 32000 bytes.  The default
  1880.             value for all shells is /A:1024.  The incremental syntax
  1881.             shown with /E below (/E+n) may also be used with /A.
  1882.  
  1883.        /C cmd
  1884.             Load a transient copy of 4DOS, execute cmd, and then return
  1885.             to the parent command processor.  This option is used by
  1886.             some application programs to start the command processor,
  1887.             execute a command, and automatically return to the program.
  1888.             It should never be used in the SHELL statement.
  1889.  
  1890.        /E
  1891.             Set the environment size.  The range of allowable
  1892.             environment sizes for all shells is 256 - 32000 bytes.
  1893.             There are two formats for this option:
  1894.  
  1895.             /E:n
  1896.                  n is the size of the environment in bytes.  The default
  1897.                  for the primary shell is /E:512.
  1898.  
  1899.             /E+n
  1900.                  Set the environment size to the amount of space
  1901.                  previously used, plus n bytes.  This allows you to
  1902.                  guarantee a certain amount of free space in a secondary
  1903.                  shell environment.  The default for secondary shells is
  1904.                  /E+128; the minimum increment allowed is 128 bytes.
  1905.  
  1906.             With either format, appending a U after the size (for
  1907.             example, /E:512U) will cause 4DOS to load the master
  1908.             environment into an XMS UMB.  (See the /U option below for
  1909.             more information on UMBs.)  This reduces low-memory
  1910.             requirements, but may not be compatible with some programs
  1911.             which access the master environment.  If no UMB is
  1912.  
  1913.  
  1914.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        21 
  1915.  
  1916.  
  1917.             available, 4DOS displays an error message, and the
  1918.             environment is put into low memory.
  1919.  
  1920.             Appending an S after the size will swap the master copy of
  1921.             the environment.  This will save a small amount of DOS memory,
  1922.             but will not work with any application that attempts to
  1923.             modify the master environment (for example, Novell Netware).
  1924.  
  1925.             4DOS will always ensure there is at least 128 bytes free in
  1926.             a secondary shell environment, and will override your /E
  1927.             parameter if necessary.
  1928.  
  1929.        /H:n
  1930.             Set the history size, where n is the size of the history
  1931.             list.  (The default is 1024 bytes; the range is 512-8192
  1932.             bytes.)
  1933.  
  1934.        /L:d:\path
  1935.             Tells 4DOS where to find 4DOS88.EXE (or 4DOS286.EXE).  The
  1936.             default is the root directory of the boot drive for the
  1937.             primary shell, and the path specified by COMSPEC for
  1938.             secondary shells.  You must use this switch if the EXE file
  1939.             is not in the default location.
  1940.  
  1941.        /P
  1942.             Load 4DOS permanently, and run AUTOEXEC.BAT.  4DOS will NOT
  1943.             run AUTOEXEC.BAT without a /P.  This option may be placed
  1944.             anywhere on the SHELL= line, but normally appears as the
  1945.             last option.  Do NOT use this option for secondary shells,
  1946.             or you will be unable to return to the primary shell.
  1947.  
  1948.        /S
  1949.             Set the 4DOS swapping mode, as follows:
  1950.  
  1951.             /S:B[d:\path]
  1952.                  Best guess swapping (default mode).  4DOS first tries
  1953.                  XMS memory swapping (on an 80286 or 80386), then EMS,
  1954.                  then disk swapping to the specified drive and directory.
  1955.                  Disk swapping filenames and defaults are as described
  1956.                  for /S:D below.
  1957.  
  1958.             /S:D[d:\path]
  1959.                  Swap to disk.  Creates a file 4DOSSWAP.xxx where xxx is
  1960.                  the current shell nesting level (000 for the primary
  1961.                  shell).  If the drive and path are not specified, disk
  1962.                  swapping will default to the root directory of the boot
  1963.                  drive for the primary shell, and the root directory of
  1964.                  the drive specified in COMSPEC for secondary shells.
  1965.  
  1966.             /S:E
  1967.                  Swap to EMS memory.  EMS swapping requires a minimum of
  1968.                  80K free EMS memory for the primary shell, and 32K for
  1969.  
  1970.  
  1971.  
  1972.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        22 
  1973.  
  1974.  
  1975.                  most secondary shells; very large environment, alias
  1976.                  list, and history sizes will require more.
  1977.  
  1978.             /S:N
  1979.                  Load 4DOS in memory-resident mode (no swapping).
  1980.  
  1981.             /S:X
  1982.                  Swap to XMS (extended) memory.  XMS swapping requires
  1983.                  an XMS device driver and a minimum of 70K of free XMS
  1984.                  memory; large environment, alias list, and history
  1985.                  sizes will require more.
  1986.  
  1987.             If 4DOS can't access EMS or XMS memory or create the disk
  1988.             swap file, it will load with swapping disabled (memory-
  1989.             resident mode).  4DOS displays the type of swapping (XMS,
  1990.             EMS, or disk) and the amount of swapping space used when it
  1991.             starts.
  1992.  
  1993.             If possible, 4DOS will reduce the space used to swap a
  1994.             secondary shell from 68K or more to about 20K by retrieving
  1995.             static information from the primary shell's swap area.  This
  1996.             feature will not work if the total of alias, history, and
  1997.             environment sizes in the secondary shell is larger than the
  1998.             total for the primary shell, or if the size of DOS memory has
  1999.             been reduced when the secondary shell is started (e.g. by a
  2000.             program like DESQView that reserves some space at the top
  2001.             end of DOS memory).
  2002.  
  2003.        /U
  2004.             Move the resident portion of 4DOS to an XMS Upper Memory
  2005.             Block (UMB).  This reduces the size of the resident portion
  2006.             in low memory from about 3K to 256 bytes, plus the
  2007.             environment size.  This option can only be used on 286 and
  2008.             386 systems with software which can map memory into the 640K
  2009.             to 1MB area and have 3K or more of free space in that area,
  2010.             and which include an XMS driver.  XMS swapping may be used
  2011.             for the rest of 4DOS via /S:X, but is not required for /U to
  2012.             work.  If the UMB load fails, the load will continue with the
  2013.             resident portion of 4DOS remaining in low memory.  See
  2014.             COMPAT.DOC for up to date information on the memory management
  2015.             software needed to enable /U to work.
  2016.  
  2017.        Any text on the 4DOS command line (including the SHELL= line)
  2018.        following the final option will be interpreted as a startup
  2019.        program command.  This allows you to directly load a program
  2020.        without running AUTOEXEC.BAT (and giving the user the opportunity
  2021.        to break out to the MS-DOS prompt with a ^C).
  2022.  
  2023.        For example, to load 4DOS in EMS swapping mode with a 2048
  2024.        character alias list and a 2048 character command history:
  2025.  
  2026.             shell=c:\4dos.com /s:e /a:2048 /h:2048 /p
  2027.  
  2028.  
  2029.  
  2030.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        23 
  2031.  
  2032.  
  2033.        To load 4DOS with a 2048 character environment in disk swapping
  2034.        mode, swapping to a RAM disk defined as F:
  2035.  
  2036.             shell=c:\4dos.com /s:df:\ /e:2048 /p
  2037.  
  2038.        To load 4DOS in "best available" swapping mode, using drive G for
  2039.        disk swapping if necessary, loading the .COM and .EXE files from
  2040.        the directory D:\BIN\4DOS, with a 1024 character environment, a
  2041.        4096 character alias list, and a 2048 character history, and the
  2042.        low-memory code moved to a UMB if possible:
  2043.  
  2044.             shell=d:\bin\4dos\4dos.com @d:\bin\4dos\4dos.opt
  2045.  
  2046.        The file D:\BIN\4DOS\4DOS.OPT: would contain:
  2047.  
  2048.             /s:bg:\ /l:d:\bin\4dos /e:1024 /a:4096 /h:2048 /u /p
  2049.  
  2050.        To load 4DOS in XMS swapping mode, with default history and
  2051.        environment, and run a program called C:\UTIL\MYSHELL
  2052.        automatically after the AUTOEXEC file (if any) is completed:
  2053.  
  2054.             shell=c:\4dos.com /s:x /p c:\util\myshell
  2055.  
  2056.        The 4DOS EXE file (4DOS88 or 4DOS286) can be loaded directly as
  2057.        the primary shell, by using it as the filename in the SHELL
  2058.        command; or as the secondary shell, by using it as the filename
  2059.        in COMSPEC.  For example:
  2060.  
  2061.             shell=c:\4dos286.exe /e:2048 /p
  2062.  
  2063.        When the EXE file is loaded directly, rather than via 4DOS.COM,
  2064.        4DOS will be in memory-resident mode.  The only options permitted
  2065.        are /A:n, /E:n, /H:n, /C,  and /P.  Aliases will not be inherited
  2066.        from a previous shell.
  2067.  
  2068.        We do not recommend this method of loading 4DOS in most
  2069.        circumstances; to load in memory-resident mode, use the /S:N
  2070.        option instead.  However, you may wish to use it to conserve disk
  2071.        space (for example, on a laptop with no hard disk), as it does
  2072.        not require 4DOS.COM to be on your disk.
  2073.  
  2074.  
  2075.  
  2076.  
  2077.  
  2078.  
  2079.  
  2080.  
  2081.  
  2082.  
  2083.  
  2084.  
  2085.  
  2086.  
  2087.  
  2088.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        24 
  2089.  
  2090.  
  2091.   The 4DSHELL Environment Variable
  2092.  
  2093.        When loading the primary shell, the shell name and options are
  2094.        both specified by the SHELL command in CONFIG.SYS.  For secondary
  2095.        shells, COMSPEC specifies the shell name, but not the options.
  2096.        4DSHELL is an environment variable, used by 4DOS to set the
  2097.        options for secondary shells.  If 4DSHELL is not defined,
  2098.        secondary shells will use default values for their options.  If
  2099.        options are set on the command line, they will override those in
  2100.        4DSHELL.
  2101.  
  2102.        4DSHELL should normally be set in AUTOEXEC.BAT.  It can contain
  2103.        any of the options listed in 4DOS Startup Options, except /C and
  2104.        /P.  If the 4DOS EXE file is not in the directory specified by
  2105.        COMSPEC, you MUST use the /L option in 4DSHELL, or secondary
  2106.        shells will not start properly.
  2107.  
  2108.        The following examples show the use of both COMSPEC and 4DSHELL
  2109.        to configure your system properly for secondary shell operation.
  2110.  
  2111.        To load 4DOS.COM and the EXE file from C:\, use EMS swapping in
  2112.        secondary shells, and guarantee 512 bytes of free environment
  2113.        space:
  2114.  
  2115.             [no COMSPEC setting necessary]
  2116.             set 4dshell=/s:e /e+512
  2117.  
  2118.        To load 4DOS.COM from C:\BIN and the 4DOS EXE file from D:\BIN,
  2119.        use best guess swapping (default), and move the resident portion
  2120.        of secondary shells to an XMS UMB if possible:
  2121.  
  2122.             set comspec=c:\bin\4dos.com
  2123.             set 4dshell=/l:d:\bin /u
  2124.  
  2125.   AUTOEXEC and 4START
  2126.  
  2127.        The AUTOEXEC.BAT file contains DOS commands to be AUTOmatically
  2128.        EXECuted by the primary shell when it starts.  It is executed
  2129.        before you are given control at the prompt.  The /P switch MUST
  2130.        be on the SHELL= line in CONFIG.SYS for AUTOEXEC.BAT to be
  2131.        executed.  AUTOEXEC cannot be a .BTM file.
  2132.  
  2133.        If you do not have an AUTOEXEC.BAT file, COMMAND.COM will prompt
  2134.        you for the current date and time.  4DOS will not; it will simply
  2135.        transfer you immediately to the 4DOS prompt.
  2136.  
  2137.        4START is an optional batch (.BAT or .BTM) file of 4DOS commands
  2138.        to be executed whenever 4DOS is started, whether as a primary or
  2139.        secondary shell.  This makes it a convenient place to put
  2140.        configuration commands such as SETDOS, to make 4DOS operate in
  2141.        the mode you want regardless of whether you are in a primary or
  2142.        secondary shell.  In the primary shell, 4START is executed before
  2143.        AUTOEXEC.BAT.
  2144.  
  2145.  
  2146.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        25 
  2147.  
  2148.  
  2149.        You should not load any memory-resident programs (TSRs) from the
  2150.        4START file, because 4DOS will attempt to load them every time it
  2151.        starts a new shell.
  2152.  
  2153.        You shouldn't load aliases from 4START, since 4DOS will pass them
  2154.        automatically to secondary shells.
  2155.  
  2156.   4DOS and COMMAND.COM
  2157.  
  2158.        In virtually all circumstances you will want to load 4DOS as your
  2159.        primary and secondary shell.  However, there are a handful of
  2160.        ill-behaved programs which dynamically modify COMMAND.COM, or
  2161.        otherwise interact with COMMAND.COM in a non-standard way, which
  2162.        may require you to load COMMAND.COM in order to work properly.
  2163.  
  2164.        In some circumstances, to run a particular program you may need
  2165.        to load a copy of COMMAND.COM from within 4DOS, then run the
  2166.        program.  In very rare circumstances, you may need to load
  2167.        COMMAND.COM as the primary shell and then load 4DOS.  An
  2168.        explanation of both techniques is included in Appendix E and the
  2169.        file COMPAT.DOC, along with a list of the programs known to
  2170.        require them.
  2171.  
  2172.        You may also find that in some cases, when there is a need to
  2173.        shell to DOS with very little memory available, you wish to use
  2174.        COMMAND.COM as your secondary shell, while 4DOS is the primary
  2175.        shell.  To do so, simply set your COMSPEC to point to
  2176.        COMMAND.COM.
  2177.  
  2178.        If you wish to run a copy of COMMAND.COM from the 4DOS prompt for
  2179.        testing or other purposes, be sure to set the COMSPEC to point to
  2180.        COMMAND.COM first.  If you don't, and an application overwrites
  2181.        the COMMAND.COM transient portion, COMMAND.COM may be unable to
  2182.        reload itself, and will give an error message and return to 4DOS.
  2183.  
  2184.  
  2185.  
  2186.  
  2187.  
  2188.  
  2189.  
  2190.  
  2191.  
  2192.  
  2193.  
  2194.  
  2195.  
  2196.  
  2197.  
  2198.  
  2199.  
  2200.  
  2201.  
  2202.  
  2203.  
  2204.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        26 
  2205.  
  2206.  
  2207.   Using 4DOS
  2208.  
  2209.        This section briefly reviews 4DOS features, and provides some
  2210.        examples of how 4DOS can help improve your productivity, and make
  2211.        your computer easier to use.  It also documents the features of
  2212.        4DOS which are not related to specific commands, such as command
  2213.        line editing, command history, command syntax, and batch files.
  2214.  
  2215.   Starting 4DOS
  2216.  
  2217.        Whenever 4DOS is loaded, it searches the boot directory for the
  2218.        file 4START.BTM or 4START.BAT, and executes it if found.  If 4DOS
  2219.        is started with the /P option, it will then execute AUTOEXEC.BAT.
  2220.  
  2221.        Because 4START is always executed when 4DOS starts, it provides a
  2222.        convenient place to put the 4DOS configuration commands (for
  2223.        example, SETDOS parameters) that would otherwise not be set when
  2224.        executing a secondary copy of 4DOS.  (For example, when shelling
  2225.        out to MS-DOS from within a program.)  See the Command Reference
  2226.        Guide for more information on SETDOS.
  2227.  
  2228.        When setting up 4START and AUTOEXEC.BAT, we recommend you break
  2229.        up the work to be done into smaller batch files.  In particular,
  2230.        if you put the aliases and environment variables into separate
  2231.        batch files and use CALL to invoke them, you can edit and
  2232.        reinvoke them later without having to reboot the system.
  2233.  
  2234.  
  2235.  
  2236.  
  2237.  
  2238.  
  2239.  
  2240.  
  2241.  
  2242.  
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248.  
  2249.  
  2250.  
  2251.  
  2252.  
  2253.  
  2254.  
  2255.  
  2256.  
  2257.  
  2258.  
  2259.  
  2260.  
  2261.  
  2262.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        27 
  2263.  
  2264.   Command Line Editing
  2265.  
  2266.        The following keys have special meanings when editing command
  2267.        lines (the caret ^ means press the Control key together with
  2268.        the specified key):
  2269.  
  2270.        Left Arrow     Move the cursor left one character.
  2271.        Right Arrow    Move the cursor right one character.
  2272.        Up Arrow       Recall the previous command from the history list,
  2273.                         or match a partial command entry with a history
  2274.                         list entry.
  2275.        Down Arrow     Recall the next command from the history list, or
  2276.                         match a partial command entry with a history list
  2277.                         entry.
  2278.        ^Left Arrow    Move the cursor left one word.
  2279.        ^Right Arrow   Move the cursor right one word.
  2280.        Home           Move the cursor to the beginning of the line.
  2281.        ^Home          Delete from the beginning of the line to the
  2282.                         character preceding the cursor.
  2283.        End            Move the cursor to the end of the line.
  2284.        ^End           Delete from the cursor to the end of the line.
  2285.        Ins            Toggle between insert and overstrike mode.
  2286.        Del            Delete the character at the cursor.
  2287.        Backspace      Delete the character to the left of the cursor.
  2288.        CR or LF       Execute the command.
  2289.        Esc            Erase the entire line.
  2290.        ^L             Delete the word to the left of the cursor.
  2291.        ^R or ^Bksp    Delete the word to the right of the cursor.
  2292.        ^C             Cancel the command.
  2293.        ^D             Delete the history list entry, erase the line, and
  2294.                         display the previous history entry.
  2295.        ^E             Go to the end of the history list and display the
  2296.                         entry.
  2297.        ^K             Save the command to the history list, and erase
  2298.                         the line.
  2299.        F1             Call the on-line help (HELP.EXE).
  2300.        F3             Repeat or complete the previous line from the
  2301.                         history list (as in COMMAND.COM)
  2302.        F8, F9 & F10   F9 scans the filename (including the wildcard
  2303.        (TAB=F9,         characters * and ?) at or immediately to the left
  2304.        shift-TAB=F8)    of the cursor position, and replaces it with the
  2305.                         first matching filename.  Pressing F9 again
  2306.                         substitutes the next filename; pressing F10
  2307.                         appends the next filename at the current cursor
  2308.                         position.  Pressing F8 gets the previous
  2309.                         filename.  If you don't enter an extension, F9
  2310.                         will append *.* to the filename; otherwise, F9
  2311.                         will append *.  See Command History and Recall
  2312.                         for more information on filename completion.
  2313.        Alt-255        You can enter characters that would normally be
  2314.                         interpreted by the line editor as a command (for
  2315.                         example, ^D) by preceding them with an Alt-255.
  2316.                         (Hold down the Alt key and enter 255 on the
  2317.                         numeric keypad.)
  2318.        Anything else  Enter that character at the cursor position.
  2319.  
  2320.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        28 
  2321.  
  2322.  
  2323.   Command History and Recall
  2324.  
  2325.        4DOS saves each command into the command history list as it is
  2326.        entered (except when executing a batch file), allowing you to
  2327.        display, recall, search, and modify previous commands.
  2328.  
  2329.        The history list size is determined by the /H parameter at
  2330.        startup time (see Installation).  The history is a circular list;
  2331.        when the history list is full, 4DOS discards the oldest
  2332.        command(s) before adding the newest.
  2333.  
  2334.        The command history list can be displayed or cleared with the
  2335.        HISTORY command.  The /H option in SETDOS allows you to enable or
  2336.        disable the history saves, and to specify a minimum length to
  2337.        save.  (See the Command Reference Guide for more information on
  2338.        HISTORY and SETDOS.)  You can prevent a command line from being
  2339.        saved in the history list by beginning it with an @.
  2340.  
  2341.        The simplest use of the command history is to repeat commands
  2342.        exactly.  For example, you might enter the command:
  2343.  
  2344.             dir /2p b:*.wks b:*.doc
  2345.  
  2346.        and then move some files to or from drive B.  When you're
  2347.        through, you want to repeat the DIR command.  Just press the up-
  2348.        arrow repeatedly to scan back through the history list; when the
  2349.        DIR command appears, press ENTER to reexecute it.
  2350.  
  2351.        After you've found the command, you can also edit it before
  2352.        pressing ENTER.  This provides a simple means of executing a
  2353.        series of commands that differ only slightly from each other.
  2354.  
  2355.        Another powerful feature is command completion, which searches
  2356.        the command history for the last command that begins with the
  2357.        characters you entered.  In the above example, you can quickly
  2358.        recall the DIR command by typing DI, and pressing the up arrow.
  2359.        4DOS will display the most recent command in the history list
  2360.        that begins with DI.  Pressing the up arrow again will display
  2361.        the next most recent match.  Typing DI and pressing the down
  2362.        arrow key instead would search for the oldest matching command in
  2363.        the history list.  4DOS will beep if there are no matching
  2364.        commands.
  2365.  
  2366.  
  2367.  
  2368.  
  2369.  
  2370.  
  2371.  
  2372.  
  2373.  
  2374.  
  2375.  
  2376.  
  2377.  
  2378.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        29 
  2379.  
  2380.  
  2381.        4DOS also offers filename completion.  For example, suppose you
  2382.        want to copy a file.  You remember that the name starts with AU,
  2383.        but you can't remember the rest.  Enter:
  2384.  
  2385.             copy au
  2386.  
  2387.        and press the F9 key.  The first filename that starts with AU
  2388.        will be inserted in the command line.  If it's the right file,
  2389.        simply complete your command.  If it's not, press F9 again to
  2390.        substitute the next matching filename.  If you go past the
  2391.        filename(s) you wanted, pressing the F8 key will return the
  2392.        previous matching filename.  The F10 key saves the current
  2393.        filename, and then appends the next matching filename to the
  2394.        command line.  You can use the wildcard characters (* and ?) in
  2395.        the filename.  4DOS will beep when there are no more matching
  2396.        filenames.
  2397.  
  2398.   Multiple Commands
  2399.  
  2400.        You may enter multiple commands on a single line.  The default
  2401.        command separator is a caret (^).  For example, the following
  2402.        command displays a directory and then copies files to the root
  2403.        directory on drive A:
  2404.  
  2405.             dir *.bat ^ copy *.bat a:\
  2406.  
  2407.        The command separator character can be changed by setting the
  2408.        COMPOUND variable (see the SETDOS command in the Command
  2409.        Reference Guide).
  2410.  
  2411.   Conditional Commands
  2412.  
  2413.        When an internal or external command finishes, it returns a
  2414.        result, called the exit code.  The conditional commands allow you
  2415.        to perform tasks based upon the previous command's exit code.
  2416.        (See also the IF ERRORLEVEL and IFF ERRORLEVEL commands in the
  2417.        Command Reference Guide.)
  2418.  
  2419.        If two commands are separated by && (AND), the second command
  2420.        will be executed only if the first returns an exit code of 0.
  2421.  
  2422.        If two commands are separated by || (OR), the second command will
  2423.        be executed only if the first returns a non-zero exit code.
  2424.  
  2425.        NOTE:  All 4DOS internal commands return an exit code (0 if
  2426.        successful, or non-zero for an error return), but not all
  2427.        external programs do.  Conditional command behavior will be
  2428.        unpredictable for programs that don't explicitly return an exit
  2429.        code.
  2430.  
  2431.  
  2432.  
  2433.  
  2434.  
  2435.  
  2436.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        30 
  2437.  
  2438.  
  2439.        For example, if the BACKUP operation fails, the files will not be
  2440.        erased:
  2441.  
  2442.             backup c:\ a: /s && global erase *.bak *.lst
  2443.  
  2444.        If the BACKUP operation fails, then ECHO will display a message:
  2445.  
  2446.             backup c:\ a: /s || echo Error in the backup!
  2447.  
  2448.   Escape Character
  2449.  
  2450.        4DOS has a user-definable escape character (a character which
  2451.        gives the following character a non-standard meaning, not the
  2452.        same as the ASCII ESC).  The default is ^X (control-X, which will
  2453.        be displayed as an up arrow ), but another character can be used
  2454.        by setting the ESCAPE variable (see the SETDOS command in the
  2455.        Command Reference Guide).   4DOS assumes special meanings when
  2456.        these characters follow the escape character on the command line:
  2457.  
  2458.             b  backspace
  2459.             e  the ASCII ESC character (27 decimal)
  2460.             f  formfeed
  2461.             n  linefeed
  2462.             r  carriage return
  2463.             t  tab
  2464.  
  2465.        Any other character following the escape character is copied
  2466.        directly to the command line and the escape character is removed.
  2467.        This allows you to suppress the normal interpretation of special
  2468.        characters (such as ? * / \ | ` > < and &).
  2469.  
  2470.        For example, to send a form feed followed by the sequence ESC Y
  2471.        to the printer:
  2472.  
  2473.             echo feY > prn
  2474.  
  2475.  
  2476.  
  2477.  
  2478.  
  2479.  
  2480.  
  2481.  
  2482.  
  2483.  
  2484.  
  2485.  
  2486.  
  2487.  
  2488.  
  2489.  
  2490.  
  2491.  
  2492.  
  2493.  
  2494.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        31 
  2495.  
  2496.   Command Echoing
  2497.  
  2498.        Like COMMAND.COM, 4DOS defaults to ECHO ON in batch files.  To
  2499.        prevent a line from being echoed, preface it with the @ symbol.
  2500.        You can tell 4DOS to default to ECHO OFF by setting the variable
  2501.        VERBOSE to 0 (see the SETDOS command in the Command Reference
  2502.        Guide).
  2503.  
  2504.        4DOS also offers command echoing during keyboard input.  If ECHO
  2505.        is set ON from the command line, the fully parsed and expanded
  2506.        command (including alias and variable expansion) will be
  2507.        displayed before it is executed.  If the command line contains
  2508.        multiple commands, each command is echoed separately just before
  2509.        it is executed.
  2510.  
  2511.        Note that the command line echo state and batch file echo state
  2512.        are independent.  Turning echo on or off inside a batch file will
  2513.        not affect command line echoing, and vice versa.
  2514.  
  2515.   Argument Quoting
  2516.  
  2517.        4DOS normally parses command line arguments by searching for
  2518.        white space (blanks, tabs, and commas).  Command line arguments
  2519.        enclosed in back quotes (`) or double quotes (") may contain
  2520.        white space.  No special processing (alias or variable expansion,
  2521.        and I/O redirection) will be performed on expressions enclosed in
  2522.        quotes, except variable expansion WILL be performed inside double
  2523.        quotes.
  2524.  
  2525.        4DOS will strip back quotes from the command line before
  2526.        executing the command.  Double quotes will be passed through to
  2527.        the command.
  2528.  
  2529.        For example, suppose the batch file QUOTES.BAT contains the
  2530.        following commands:
  2531.  
  2532.             @echo off
  2533.             echo Arg1 = %1
  2534.             echo Arg2 = %2
  2535.             echo Arg3 = %3
  2536.  
  2537.        and that the environment variable %FORVAR has been defined as:
  2538.  
  2539.             set %forvar=for
  2540.  
  2541.        Entering the command:
  2542.  
  2543.             quotes `Now is the time %forvar` all good
  2544.  
  2545.        produces the following output:
  2546.  
  2547.             Arg1 = Now is the time %forvar
  2548.             Arg2 = all
  2549.             Arg3 = good
  2550.  
  2551.  
  2552.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        32 
  2553.  
  2554.  
  2555.        and entering the command:
  2556.  
  2557.             quotes "now is the time %forvar" all good
  2558.  
  2559.        produces the following output:
  2560.  
  2561.             Arg1 = "Now is the time for"
  2562.             Arg2 = all
  2563.             Arg3 = good
  2564.  
  2565.        When an alias is defined in a batch file or from the command line
  2566.        (see Aliases), its argument should be enclosed in back-quotes to
  2567.        prevent the expansion of parameters, variables, and multiple
  2568.        commands until the alias is invoked.  Back quotes should NOT be
  2569.        used when defining aliases to be read in an ALIAS /R file.
  2570.  
  2571.   Batch Files
  2572.  
  2573.        COMMAND.COM executes batch files by opening the file, reading one
  2574.        line, saving the position, closing the file, executing the line,
  2575.        opening the file, moving to the saved position, reading the next
  2576.        line, etc.  This scheme has two advantages: batch files can
  2577.        modify themselves dynamically, and they can extend across
  2578.        multiple disks.  It also has one disadvantage: batch files run
  2579.        very slowly.
  2580.  
  2581.        For the sake of compatibility, 4DOS processes .BAT files the same
  2582.        way.  But 4DOS also offers a much faster approach, called Batch
  2583.        to Memory (.BTM).  Since a .BTM file is loaded entirely into RAM
  2584.        before it is executed (requiring only one disk access), .BTM
  2585.        files run two to five times faster than .BAT files (even faster
  2586.        on floppy disks).  For very small batch files the difference
  2587.        between .BAT and .BTM files will be negligible, but for large
  2588.        files or ones with loops, a .BTM will run nearly as fast as an
  2589.        alias.  Most .BAT files can be renamed to a .BTM extension and
  2590.        immediately realize a significant performance improvement.
  2591.  
  2592.        The maximum size of a .BTM file is 64K bytes.
  2593.  
  2594.        You should not use a .BTM file (or a .BAT file which is CALLed
  2595.        from a .BTM file) to load memory-resident (TSR) programs.  If you
  2596.        do, the memory used for the .BTM file will be located below the
  2597.        TSR.  When the .BTM file exits, this memory will be freed and you
  2598.        will be left with a "hole" in memory.  This is not harmful, but
  2599.        wastes memory.
  2600.  
  2601.        4DOS also offers an additional "Cancel ALL" option for ^C
  2602.        handling in batch files.  If you press ^C or ^BREAK while in a
  2603.        batch file, 4DOS will prompt:
  2604.  
  2605.             Cancel batch job ? (Y/N/A) :
  2606.  
  2607.  
  2608.  
  2609.  
  2610.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        33 
  2611.  
  2612.  
  2613.        Pressing N will continue batch processing at the next line.
  2614.        Pressing Y will end the current batch file and return to the
  2615.        calling batch file (if any).  Pressing A will cancel all batch
  2616.        file processing, regardless of the nesting level (see CALL and
  2617.        CANCEL in the Command Reference Guide) and return to the command
  2618.        prompt.
  2619.  
  2620.        Batch files may be "nested" (batch file A CALLs batch file B
  2621.        which CALLS batch file C, etc.) up to 8 levels deep.
  2622.  
  2623.   Batch File Variables
  2624.  
  2625.        Batch file variables are only active inside a batch file.  They
  2626.        are referenced as %0 to %127, and expand to the matching argument
  2627.        on the command line that started the batch file.  The parameter
  2628.        %n& is a special case, and expands to all arguments in the
  2629.        command line tail, starting at argument number n.  If n is not
  2630.        specified, it defaults to 1 (so %& expands to all arguments in
  2631.        the command line tail).
  2632.  
  2633.        The batch variable %# expands to the number of command line
  2634.        arguments, not including %0 (the batch file name).
  2635.  
  2636.        Note that the SHIFT command will shift both the numbered
  2637.        variables (%0, %1, etc.) and the %n& and %# variables.
  2638.  
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644.  
  2645.  
  2646.  
  2647.  
  2648.  
  2649.  
  2650.  
  2651.  
  2652.  
  2653.  
  2654.  
  2655.  
  2656.  
  2657.  
  2658.  
  2659.  
  2660.  
  2661.  
  2662.  
  2663.  
  2664.  
  2665.  
  2666.  
  2667.  
  2668.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        34 
  2669.  
  2670.  
  2671.   Aliases
  2672.  
  2673.        Much of the power of 4DOS comes together when using aliases.  An
  2674.        alias is a new name for a command or combination of commands.
  2675.        Aliases are defined with the ALIAS command, and removed with the
  2676.        UNALIAS command.  Aliases are expanded before the command line is
  2677.        broken up for multiple commands, redirection, and conditional
  2678.        commands.  Aliases may be nested; i.e., an alias can refer to
  2679.        another alias, but they cannot refer back to themselves.
  2680.  
  2681.        The alias name is limited to no more than 80 characters, and the
  2682.        alias argument to no more than 255 characters.
  2683.  
  2684.        The simplest type of alias is to give a new name to an existing
  2685.        command.  For example:
  2686.  
  2687.             alias up cd ..
  2688.  
  2689.        defines the alias UP to mean "change to the parent directory".
  2690.        Aliases can also create a customized version of a command.  For
  2691.        example, the 4DOS DIR command allows a directory to be sorted in
  2692.        various ways.  The alias:
  2693.  
  2694.             alias de dir /oe /p
  2695.  
  2696.        defines the alias DE to mean "sort the directory by extension,
  2697.        pausing after each page."
  2698.  
  2699.        Aliases can also be used to execute multiple commands; when used
  2700.        this way they act like very fast, in-memory batch files.  For
  2701.        example, entering the command:
  2702.  
  2703.             alias w `pushd c:\wp ^ wp %& ^ popd`
  2704.  
  2705.        defines the alias W to mean "save the current directory, change
  2706.        to the WP directory on C, run the WP program passing it all of
  2707.        the arguments on the command line following the alias name, and
  2708.        when finished, restore the original directory."  The back quotes
  2709.        are required to tell 4DOS this is a single alias with three
  2710.        commands, rather than three commands on a single line (see
  2711.        Multiple Commands).
  2712.  
  2713.        You can stop alias expansion by prefacing the alias with an
  2714.        asterisk (*).  This allows you to use aliases to define commands
  2715.        as variations of themselves, or to rename internal commands to
  2716.        avoid conflicts with external programs.  For example, the alias
  2717.        definition:
  2718.  
  2719.             alias global global /I
  2720.  
  2721.        will fail with an "alias loop" error message, but the alias:
  2722.  
  2723.             alias global *global /I
  2724.  
  2725.  
  2726.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        35 
  2727.  
  2728.  
  2729.        will work properly.  You can also use this feature to rename a
  2730.        4DOS internal command (for example, if you have an external
  2731.        program of the same name).  The following alias definitions
  2732.        rename the LIST command to DISPLAY, and call an external program
  2733.        for LIST:
  2734.  
  2735.             alias display *list
  2736.             alias list c:\util\list.com
  2737.  
  2738.        Alias names can be truncated by including an asterisk (*) in the
  2739.        alias name.  For example, if you have an alias defined as:
  2740.  
  2741.             alias wher*eis dir /dp
  2742.  
  2743.        you can refer to it as wher, where, wherei, or whereis.
  2744.  
  2745.        Alias definitions can include replaceable parameters, like those
  2746.        in batch files.  Alias parameters are referenced as %1 to %127,
  2747.        and expand to the matching command line argument.  The parameter
  2748.        %n& is a special case, and expands to all arguments in the
  2749.        command line tail, starting at argument number n.  If n is not
  2750.        specified, it defaults to 1 (so %& expands to all arguments in
  2751.        the command line tail).
  2752.  
  2753.        If an alias has replaceable parameters, 4DOS will delete command
  2754.        line arguments up to and including the highest referenced
  2755.        argument.  For example, if you have an alias which refers only to
  2756.        %1 and %4, then the first and fourth arguments passed to the
  2757.        alias will be used, the second and third arguments will be
  2758.        discarded, and any additional arguments beyond the fourth will be
  2759.        appended to the end of the alias.  If an alias has no replaceable
  2760.        parameters, all of the command line arguments will be appended to
  2761.        the alias.
  2762.  
  2763.        For example, the following alias will change directories, perform
  2764.        a command, and return to the original directory:
  2765.  
  2766.             alias in `pushd %1 ^ %2& ^ popd`
  2767.  
  2768.        When this alias is invoked with:
  2769.  
  2770.             in c:\comm mycomm /xmodem /2400
  2771.  
  2772.        it is expanded into the following three commands:
  2773.  
  2774.             pushd c:\comm
  2775.             mycomm /xmodem /2400
  2776.             popd
  2777.  
  2778.  
  2779.  
  2780.  
  2781.  
  2782.  
  2783.  
  2784.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        36 
  2785.  
  2786.  
  2787.  
  2788.        The distribution disk includes a sample alias file (ALIASES)
  2789.        which demonstrates a number of useful predefined aliases.
  2790.  
  2791.        See the ALIAS and UNALIAS commands in the Command Reference Guide
  2792.        for more information and examples.
  2793.  
  2794.   Executable Extensions
  2795.  
  2796.        4DOS provides a means to specify a program to be invoked when a
  2797.        filename which does not have a .COM, .EXE, .BTM, or .BAT
  2798.        extension is entered as the first argument on the command line.
  2799.        For example, you could start your text editor when a text file is
  2800.        specified, or your spreadsheet program when a worksheet file is
  2801.        specified.
  2802.  
  2803.        4DOS uses environment variables to define what program or batch
  2804.        file to run for a particular extension.  The syntax of the SET
  2805.        command to define an executable extension is:
  2806.  
  2807.             SET .ext=d:\path\program [options]
  2808.  
  2809.        where .EXT is the file extension, D:\PATH\PROGRAM  is the full
  2810.        name of the program or batch file to be called, and [options]
  2811.        are any startup options you want to specify for the program.  The
  2812.        file to be executed must be a .COM, .EXE, .BTM, or .BAT file; it
  2813.        cannot be an alias or internal command.
  2814.  
  2815.        For example, the following command would define BASICA.COM as the
  2816.        processor for .BAS files:
  2817.  
  2818.             set .bas=c:\dos\basica.com
  2819.  
  2820.        The following command would define B.EXE (the Brief text editor)
  2821.        as the processor for .C files:
  2822.  
  2823.             set .C=c:\brief\b.exe -Mxyz
  2824.  
  2825.        If you have a file HELLO.C, and enter the command:
  2826.  
  2827.             hello -i30
  2828.  
  2829.        4DOS expands the command line to:
  2830.  
  2831.             c:\brief\b.exe -Mxyz hello.c -i30
  2832.  
  2833.  
  2834.  
  2835.  
  2836.  
  2837.  
  2838.  
  2839.  
  2840.  
  2841.  
  2842.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        37 
  2843.  
  2844.  
  2845.        Note that 4DOS inserts the value of the environment variable at
  2846.        the beginning of the line, including any options, then appends
  2847.        the original command name (i.e., the file name, with extension
  2848.        added if necessary), and the remainder of the original command
  2849.        line.
  2850.  
  2851.        4DOS searches for external commands in the following order:
  2852.        .COM, .EXE, .BTM, .BAT, and executable extensions (in the order
  2853.        they appear in the environment) in the current directory, and
  2854.        then in each subdirectory specified by the PATH environment
  2855.        variable.
  2856.  
  2857.  
  2858.  
  2859.  
  2860.  
  2861.  
  2862.  
  2863.  
  2864.  
  2865.  
  2866.  
  2867.  
  2868.  
  2869.  
  2870.  
  2871.  
  2872.  
  2873.  
  2874.  
  2875.  
  2876.  
  2877.  
  2878.  
  2879.  
  2880.  
  2881.  
  2882.  
  2883.  
  2884.  
  2885.  
  2886.  
  2887.  
  2888.  
  2889.  
  2890.  
  2891.  
  2892.  
  2893.  
  2894.  
  2895.  
  2896.  
  2897.  
  2898.  
  2899.  
  2900.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        38 
  2901.  
  2902.  
  2903.   Keystack
  2904.  
  2905.        The KEYSTACK command can be used in aliases and batch files to
  2906.        feed keystrokes to application programs.  The most common use of
  2907.        KEYSTACK is to have a program take certain actions when it
  2908.        starts.  For example, when the alias (this should be entered on
  2909.        one line):
  2910.  
  2911.             alias 321 `keystack 0 13 0 13 0 13 0 13 0 13 "/fr" 0 "%1" 13 ^
  2912.                123`
  2913.  
  2914.        is executed as:
  2915.  
  2916.             321 February
  2917.  
  2918.        it loads Lotus 1-2-3, skips the startup screens, and loads the
  2919.        spreadsheet FEBRUARY.WK1.
  2920.  
  2921.        KEYSTACK can store up to 255 characters, enough keystrokes to
  2922.        cause a program to do an entire operation and exit.  For example,
  2923.        the following alias DRPT will run a dBASE report called TIMEREP
  2924.        in the directory DATA (this should be entered on one line):
  2925.  
  2926.             alias drpt `pushd c:\data ^ keystack "use times index times"
  2927.                13 "report form timerep to print" 13 "quit" 13 ^ dbase ^
  2928.                popd`
  2929.  
  2930.        See the Command Reference Guide for more information on KEYSTACK.
  2931.  
  2932.        KEYSTACK.SYS is a small device driver invoked in your CONFIG.SYS
  2933.        file (see Installation) and used to support the KEYSTACK command.
  2934.        You must have KEYSTACK.SYS installed to use the KEYSTACK command.
  2935.  
  2936.  
  2937.  
  2938.  
  2939.  
  2940.  
  2941.  
  2942.  
  2943.  
  2944.  
  2945.  
  2946.  
  2947.  
  2948.  
  2949.  
  2950.  
  2951.  
  2952.  
  2953.  
  2954.  
  2955.  
  2956.  
  2957.  
  2958.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        39 
  2959.  
  2960.  
  2961.   Environment Variables
  2962.  
  2963.        Environment variables are defined with the SET command.  (See the
  2964.        Command Reference Guide for more information on SET.)
  2965.  
  2966.        Environment variables are expanded before the command line is
  2967.        broken up for multiple commands, redirection, and conditional
  2968.        commands, but after alias expansion has been done.
  2969.  
  2970.        Variables are referenced in a command by starting the variable
  2971.        name with a percent sign (%).  Two percent signs in a row (%%)
  2972.        signify a percent sign character.  An environment variable name
  2973.        is terminated by either another percent sign, or by an invalid
  2974.        character (see below).  To pass a variable name (instead of the
  2975.        value) to a command (for example, in INKEY or INPUT), you must
  2976.        precede it with two percent signs.
  2977.  
  2978.        Environment variable names may be composed of any alphanumeric
  2979.        character, plus the underscore (_) and $ characters.
  2980.  
  2981.        For example:
  2982.  
  2983.             c:\> set start=c:\wordproc\myfiles\memos
  2984.             c:\> dir /w %start
  2985.  
  2986.        In addition to the standard variable name characters, you can
  2987.        force 4DOS to accept any sequence of characters as a valid
  2988.        variable name by enclosing it in square brackets.  For example:
  2989.  
  2990.             %[AB##1]
  2991.  
  2992.        refers to an environment variable named AB##1.
  2993.  
  2994.        There are some variable names that have special meanings in 4DOS.
  2995.        Only PATH, CMDLINE and TMP are actually stored in the
  2996.        environment; the remainder are internal to 4DOS, and cannot be
  2997.        viewed or modified with SET or ESET.  The internal variable names
  2998.        are checked after variable expansion, so they can be overridden
  2999.        by creating an environment variable of the same name.
  3000.  
  3001.          ? returns the exit code of the last external program (see
  3002.               ERRORLEVEL).  This allows you to save an exit code into
  3003.               another variable and then process it later, or to see what
  3004.               a program is actually returning.
  3005.  
  3006.          PATH tells 4DOS where to search for executable files (.COM,
  3007.               .EXE, .BTM and .BAT) not in the current directory.  Some
  3008.               applications also use the PATH variable to find their
  3009.               files.
  3010.  
  3011.          CMDLINE is the fully expanded 255-character command line.  You
  3012.               can access it from an external program by searching the
  3013.               environment.
  3014.  
  3015.  
  3016.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        40 
  3017.  
  3018.  
  3019.          TMP specifies where 4DOS should put the temporary pipe files
  3020.               (see Redirection).
  3021.  
  3022.          _BG is the screen background color at the current cursor
  3023.               position.
  3024.  
  3025.          _COLUMNS is the width of the screen
  3026.  
  3027.          _CPU is the cpu type, returned as a string:
  3028.  
  3029.                86  8086 and 8088
  3030.               186  80186 and 80188
  3031.               200  NEC V20 and V30
  3032.               286  80286
  3033.               386  80386 and 80486
  3034.  
  3035.          _CWD is the current directory in the format d:\pathname.
  3036.  
  3037.          _CWDS has the same value as CWD, except it ensures the pathname
  3038.               ends in a backslash (\).
  3039.  
  3040.          _CWP is the current directory in the format \pathname.
  3041.  
  3042.          _CWPS has the same value as CWP, except it ensures the pathname
  3043.               ends in a backslash (\).
  3044.  
  3045.          _DATE contains the current system date, in the format mm-dd-yy
  3046.               (U.S.), dd-mm-yy (Europe), or yy-mm-dd (Japan).
  3047.  
  3048.          _DISK is the current disk (for example, C).
  3049.  
  3050.          _DOSVER is the current MS-DOS version (for example, 3.3).
  3051.  
  3052.          _DOW is the day of the week as a string (Mon, Tue, etc.)
  3053.  
  3054.          _FG is the screen foreground color at the current cursor
  3055.               position.
  3056.  
  3057.          _NDP is the numeric data processor (coprocessor) type, returned
  3058.               as a string:
  3059.  
  3060.                 0  no coprocessor is installed
  3061.                87  8087
  3062.               287  80287
  3063.               387  80387
  3064.  
  3065.          _ROWS is the height of the screen
  3066.  
  3067.          _SHELL is the current shell nesting level (in swapping mode).
  3068.               The root shell is 0.  If you are not in swapping mode,
  3069.               _SHELL returns 99.
  3070.  
  3071.  
  3072.  
  3073.  
  3074.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        41 
  3075.  
  3076.          _TIME contains the current system time in the format hh:mm:ss .
  3077.               The separator character may vary depending depending upon
  3078.               your country information - see CHCP in the Command
  3079.               Reference Guide).
  3080.  
  3081.   Variable Functions
  3082.  
  3083.        4DOS Version 3 introduces a new type of environment variable.
  3084.        Called Variable Functions, they take one or more arguments (which
  3085.        can be environment variables or variable functions themselves),
  3086.        and return a value.  Like all environment variables, variable
  3087.        functions must be preceded or surrounded by % signs when used.
  3088.        The variable functions are:
  3089.  
  3090.          @eval[expression] - evaluate an arithmetic expression.  It
  3091.               supports parentheses, addition, subtraction, multiplication,
  3092.               division, and modulo (%%).  The expression can contain envi-
  3093.               ronment variables, including other variable functions.  The
  3094.               elements of the expression and the result are integers between
  3095.               -2,147,483,640 and +2,147,483,647.  For example, if the value
  3096.               of the variable "a" is 5, then %@eval[(%a*4)-2] returns 18.
  3097.  
  3098.          @ext[filename] - returns the file extension (without the
  3099.               leading period)
  3100.  
  3101.          @full[filename] - returns the fully qualified path name
  3102.  
  3103.          @index[string1,string2] - returns the position of string2 within
  3104.               string1.  The first position in string1 is numbered 0.  If
  3105.               there is no match, the function returns -1.
  3106.  
  3107.          @len[string] - returns the length of the string
  3108.  
  3109.          @line[filename,n] - returns line "n" of the specified file.  (The
  3110.               first line is line 0.)
  3111.  
  3112.          @lower[string] - returns the string shifted to lower case
  3113.  
  3114.          @name[filename] - returns the filename only (no path or extension)
  3115.  
  3116.          @path[filename] - returns the path only (including the trailing
  3117.               backslash)
  3118.  
  3119.          @search[filename] - searches for the filename, using the PATH
  3120.               environment variable, and appends an extension (.COM, .EXE,
  3121.               .BAT, .BTM, or executable extension) if one wasn't specified.
  3122.  
  3123.          @substr[string,start,length] - returns a substring, starting at
  3124.               the position start and continuing for length characters.  If
  3125.               length is negative, the start is relative to the right side.
  3126.               (The first character is 0.)  For example, to get the current
  3127.               time and extract the hour use %@substr[%_time,0,2].
  3128.  
  3129.          @upper[string] - returns the string shifted to upper case
  3130.  
  3131.  
  3132.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        42 
  3133.  
  3134.  
  3135.   I/O Redirection
  3136.  
  3137.        MS-DOS assumes input comes from the keyboard and output goes to
  3138.        the display.  The keyboard is referred to as the standard input,
  3139.        and the display is referred to as the standard output.  You can
  3140.        change the default standard input and standard output by using
  3141.        the < and > symbols on the command line.  4DOS also allows you to
  3142.        redirect the standard error by appending the & character.
  3143.  
  3144.        Normally, when redirecting standard output, if the specified file
  3145.        doesn't exist, it is created; if it exists, it is overwritten,
  3146.        and the previous contents are lost.  If the variable NOCLOBBER is
  3147.        set (see the SETDOS command in the Command Reference Guide), an
  3148.        error message will be displayed if the file already exists.
  3149.  
  3150.        For example, to get standard input from a file instead of the
  3151.        keyboard, append:
  3152.  
  3153.             < filename
  3154.  
  3155.        to the command line.  To redirect standard output to a file:
  3156.  
  3157.             > filename
  3158.  
  3159.        To redirect standard output to a file, overriding the NOCLOBBER
  3160.        setting:
  3161.  
  3162.             >! filename
  3163.  
  3164.        To redirect standard output and standard error to a file:
  3165.  
  3166.             >& filename
  3167.  
  3168.        To redirect standard error only to a file:
  3169.  
  3170.             >&> filename
  3171.  
  3172.        To redirect standard output and standard error to a file,
  3173.        overriding the NOCLOBBER setting:
  3174.  
  3175.             >&! filename
  3176.  
  3177.        To append standard output or standard error to a file, use >> in
  3178.        place of the first >.  If NOCLOBBER is set, the file must exist
  3179.        before it can be appended to (unless overridden by a !).
  3180.        Otherwise, 4DOS will create the file.
  3181.  
  3182.        Pipes allow you to send the output of one command to the input of
  3183.        another command by separating the commands with the vertical bar
  3184.        (|).  4DOS will perform the commands in order from left to right.
  3185.  
  3186.  
  3187.  
  3188.  
  3189.  
  3190.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        43 
  3191.  
  3192.  
  3193.        For example, to use the standard output of command1 as the
  3194.        standard input of command2:
  3195.  
  3196.          command1 | command2
  3197.  
  3198.        To use the standard output and standard error of command1 as the
  3199.        standard input of command2:
  3200.  
  3201.          command1 |& command2
  3202.  
  3203.        4DOS creates temporary files to hold the output of the pipes.
  3204.        The default directory for these temporary files is the root
  3205.        directory on the boot drive, but this can be overridden with the
  3206.        TMP environment variable.  This is useful when booting from a
  3207.        floppy disk or a read-only network drive, or to speed up piping
  3208.        operations by putting the temporary files on a RAM disk.
  3209.  
  3210.        For example, to put the pipe files on a RAM disk defined as drive
  3211.        E:
  3212.  
  3213.          set tmp=e:\
  3214.  
  3215.        4DOS also provides TEE and Y "pipe fittings" (see the Command
  3216.        Reference Guide for more information on TEE and Y).
  3217.  
  3218.  
  3219.  
  3220.  
  3221.  
  3222.  
  3223.  
  3224.  
  3225.  
  3226.  
  3227.  
  3228.  
  3229.  
  3230.  
  3231.  
  3232.  
  3233.  
  3234.  
  3235.  
  3236.  
  3237.  
  3238.  
  3239.  
  3240.  
  3241.  
  3242.  
  3243.  
  3244.  
  3245.  
  3246.  
  3247.  
  3248.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        44 
  3249.  
  3250.  
  3251.   Command Parsing
  3252.  
  3253.        Because of the number of features in 4DOS, the command line
  3254.        parsing is somewhat complex.  The following is a summary of the
  3255.        process 4DOS uses to interpret command line input:
  3256.  
  3257.          ∙ Read the command line (from console or batch file) and strip
  3258.             leading white space
  3259.  
  3260.          ∙ Check for a leading @
  3261.               ∙ Save line to history list if no @ found, and if not in a
  3262.             batch file
  3263.               ∙ Set the "no echo" flag if @ found
  3264.  
  3265.          ∙ Perform alias expansion, including expansion of nested
  3266.             aliases, for the first command on the line.
  3267.  
  3268.          ∙ Perform environment variable expansion (except the EXCEPT,
  3269.             FOR, GLOBAL, and SELECT commands) for the first command on
  3270.             the line
  3271.  
  3272.          ∙ Scan the first command for pipes, compound commands or
  3273.             conditionals
  3274.  
  3275.          ∙ Perform redirection (except the EXCEPT, FOR, GLOBAL, and
  3276.             SELECT commands)
  3277.  
  3278.          ∙ Get the first argument and search for commands in the
  3279.             following order:
  3280.               1.  Internal commands
  3281.               2.  External commands - .COM, .EXE, .BTM, and .BAT in that
  3282.             order
  3283.               3.  Executable extensions (in the order they appear in the
  3284.             environment)
  3285.  
  3286.          ∙ Execute the command
  3287.  
  3288.          ∙ Get the remainder of the command line, if any, and test for
  3289.             conditionals
  3290.  
  3291.          ∙ Repeat the above steps for the next command on the line (if
  3292.             any)
  3293.  
  3294.        If you are having trouble getting aliases, batch files, multiple
  3295.        commands, environment variable substitution, or other features
  3296.        related to command parsing to work properly, you may want to step
  3297.        through the command to determine how 4DOS is parsing it.  When
  3298.        doing this you may find it useful to run the command with ECHO
  3299.        set on so you can see the expanded command 4DOS is trying to
  3300.        execute.
  3301.  
  3302.  
  3303.  
  3304.  
  3305.  
  3306.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        45 
  3307.  
  3308.  
  3309.   Command Reference Guide
  3310.  
  3311.        4DOS has more than 70 internal commands.  Some are the same as,
  3312.        or improvements of, those in COMMAND.COM.  The remainder are new
  3313.        commands.
  3314.  
  3315.        These commands are equivalent to those in COMMAND.COM:
  3316.  
  3317.          BREAK          CHCP           CTTY           DATE
  3318.          EXIT           GOTO           TIME           VER
  3319.          VERIFY
  3320.  
  3321.        These commands are enhanced:
  3322.  
  3323.          CD             CHDIR          CLS            COPY
  3324.          DEL            DIR            ECHO           ERASE
  3325.          FOR            IF             MD             MKDIR
  3326.          PATH           PAUSE          PROMPT         RD
  3327.          REM            REN            RENAME         RMDIR
  3328.          SET            SHIFT          TYPE           VOL
  3329.  
  3330.        These commands are new:
  3331.  
  3332.          ?              ALIAS          ATTRIB         BEEP
  3333.          CALL           CANCEL         CDD            COLOR
  3334.          DESCRIBE       DIRS           DRAWBOX        DRAWHLINE
  3335.          DRAWVLINE      ENDLOCAL       ESET           EXCEPT
  3336.          FREE           GLOBAL         GOSUB          HISTORY
  3337.          IFF            INKEY          INPUT          KEYSTACK
  3338.          LIST           LOG            MEMORY         MOVE
  3339.          POPD           PUSHD          QUIT           RETURN
  3340.          SCREEN         SCRPUT         SELECT         SETDOS
  3341.          SETLOCAL       SWAPPING       TEE            TEXT
  3342.          TIMER          UNALIAS        UNSET          Y
  3343.  
  3344.  
  3345.  
  3346.  
  3347.  
  3348.  
  3349.  
  3350.  
  3351.  
  3352.  
  3353.  
  3354.  
  3355.  
  3356.  
  3357.  
  3358.  
  3359.  
  3360.  
  3361.  
  3362.  
  3363.  
  3364.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        46 
  3365.  
  3366.  
  3367.   Command Syntax
  3368.  
  3369.        Words in uppercase are keywords and must be entered.  Words in
  3370.        lowercase are either options (e.g., "on", "off", "bright",
  3371.        "blink") or variables (e.g. "filename", "path").
  3372.  
  3373.        The expression d: represents a disk drive specification.  (This
  3374.        can be A:, B:, C:, etc.).
  3375.  
  3376.        Words or letters in brackets ([ ]) are optional and are not
  3377.        required to be entered.
  3378.  
  3379.        A vertical bar (|) separating words means enter one word or the
  3380.        other, but not both.
  3381.  
  3382.        A letter preceded by a forward slash (/) is a switch.  Switches
  3383.        are used to enable or disable the various command options.
  3384.        Because 4DOS supports multiple arguments for most commands,
  3385.        switches affect specific arguments, and must be placed with those
  3386.        arguments.  Pay careful attention to switch placement as it is
  3387.        described under the various commands.  The effects occasionally
  3388.        vary between commands in order to retain compatibility with
  3389.        COMMAND.COM.
  3390.  
  3391.        An ellipsis (...) means additional arguments are allowed, but not
  3392.        required.
  3393.  
  3394.        In the examples in the printed manual, characters in bold type
  3395.        represent input from the user.  Characters in normal type
  3396.        represent 4DOS prompts or responses.
  3397.  
  3398.  
  3399.  
  3400.  
  3401.  
  3402.  
  3403.  
  3404.  
  3405.  
  3406.  
  3407.  
  3408.  
  3409.  
  3410.  
  3411.  
  3412.  
  3413.  
  3414.  
  3415.  
  3416.  
  3417.  
  3418.  
  3419.  
  3420.  
  3421.  
  3422.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        47 
  3423.  
  3424.  
  3425.   ?
  3426.  
  3427.   Syntax:     ?
  3428.  
  3429.   Purpose:    Display the 4DOS commands.
  3430.  
  3431.   Comments:   ? will display the 4DOS internal commands.  For help
  3432.               with the internal 4DOS and external DOS commands, see
  3433.               the HELP command.
  3434.  
  3435.   Example:    Display the internal commands:
  3436.  
  3437.                  c:\> ?
  3438.                  ?            ALIAS        ATTRIB       BEEP
  3439.                  BREAK        CALL         CANCEL       CD
  3440.                  CDD          CHCP         CHDIR        CLS
  3441.                  COLOR        COPY         CTTY         DATE
  3442.                  DEL          DESCRIBE     DIR          DIRS
  3443.                  DRAWBOX      DRAWHLINE    DRAWVLINE    ECHO
  3444.                  ENDLOCAL     ERASE        ESET         EXCEPT
  3445.                  EXIT         FOR          FREE         GLOBAL
  3446.                  GOSUB        GOTO         HISTORY      IF
  3447.                  IFF          INKEY        INPUT        KEYSTACK
  3448.                  LIST         LOG          MD           MEMORY
  3449.                  MKDIR        MOVE         PATH         PAUSE
  3450.                  POPD         PROMPT       PUSHD        QUIT
  3451.                  RD           REM          REN          RENAME
  3452.                  RETURN       RMDIR        SCREEN       SCRPUT
  3453.                  SELECT       SET          SETDOS       SETLOCAL
  3454.                  SHIFT        SWAPPING     TEE          TEXT
  3455.                  TIME         TIMER        TYPE         UNALIAS
  3456.                  UNSET        VER          VERIFY       VOL
  3457.                  Y
  3458.  
  3459.  
  3460.  
  3461.  
  3462.  
  3463.  
  3464.  
  3465.  
  3466.  
  3467.  
  3468.  
  3469.  
  3470.  
  3471.  
  3472.  
  3473.  
  3474.  
  3475.  
  3476.  
  3477.  
  3478.  
  3479.  
  3480.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        48 
  3481.  
  3482.  
  3483.   ALIAS
  3484.  
  3485.   Syntax:     ALIAS [/P] [/R filename...] [name[=][value]]
  3486.  
  3487.   Purpose:    Load or display the alias list, or define name as a
  3488.               substitute for value.
  3489.  
  3490.   Comments:   Aliases are useful as a means of executing a complex
  3491.               series of commands with a few keystrokes.  Aliases can
  3492.               also be used as "in memory batch files," and will run much
  3493.               faster than disk-based batch files.
  3494.  
  3495.               If you only specify name, ALIAS displays the current
  3496.               alias value for name.  Otherwise, ALIAS assigns the
  3497.               command(s) in value to name.  (Value may contain
  3498.               environment variables or additional aliases.)  Name can
  3499.               now be used as if it were a built-in or external command.
  3500.               If you don't specify any arguments, ALIAS displays the
  3501.               current alias list.
  3502.  
  3503.               Name is limited to no more than 80 characters, and
  3504.               value to no more than 255 characters.
  3505.  
  3506.               The /P(ause) option will pause after displaying each
  3507.               page and wait for a key to be pressed.
  3508.  
  3509.               The /R(ead) option allows you to load an alias list
  3510.               from a file.  This is much faster than loading aliases
  3511.               from a batch file.  The file is in the same format as the
  3512.               ALIAS display, so ALIAS /R can accept as input a file
  3513.               generated by redirecting ALIAS output.  You can add
  3514.               comments to an alias file by starting the comment line
  3515.               with a colon (:).  You can load multiple files with
  3516.               one ALIAS /R command by placing the names one after
  3517.               another on the command line, separated by spaces.
  3518.  
  3519.               For example, the following commands will save the
  3520.               aliases to a file, and then reload them from that file:
  3521.  
  3522.                    alias > alist
  3523.                    alias /r alist
  3524.  
  3525.               When defining aliases at the command line, back quotes
  3526.               must be used around the alias arguments that contain
  3527.               multiple commands or variable references (%1, %&2, etc.)
  3528.               to prevent premature expansion.  Back quotes should NOT be
  3529.               used when defining aliases in a file to be read with ALIAS
  3530.               /R.
  3531.  
  3532.  
  3533.  
  3534.  
  3535.  
  3536.  
  3537.  
  3538.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        49 
  3539.  
  3540.  
  3541.               Aliases may be nested; i.e., an alias can refer to another
  3542.               alias, but they cannot refer back to themselves (a=b=a).
  3543.               You can stop further alias expansion by prefacing the
  3544.               alias argument with an asterisk (*).  This also allows an
  3545.               alias to refer to a command of the same name (see below
  3546.               for an example).
  3547.  
  3548.               An alias name can be truncated by including an asterisk
  3549.               (*) in the alias name (see example).
  3550.  
  3551.               To remove an alias, use the UNALIAS command.
  3552.  
  3553.               For more information on aliases (including the use of
  3554.               variables), see the Aliases section in Using 4DOS, and the
  3555.               sample file ALIASES, distributed with 4DOS.
  3556.  
  3557.   Example:    Define D as an alias for DIR /AP:
  3558.  
  3559.                    c:\> alias d dir /ap
  3560.  
  3561.               Display the current alias(es):
  3562.  
  3563.                    c:\> alias
  3564.                    D=dir /ap
  3565.  
  3566.               The following example creates a new command WHEREIS
  3567.               that searches a disk for matching files and
  3568.               subdirectories:
  3569.  
  3570.                    c:\> alias whereis dir /dp
  3571.  
  3572.               The same command using alias name truncation (this
  3573.               alias can be referenced as wher, where, wherei, or
  3574.               whereis):
  3575.  
  3576.                    c:\> alias wher*eis dir /dp
  3577.  
  3578.               The following example erases the backup files, and then
  3579.               displays the directory (the back-quotes are necessary to
  3580.               prevent 4DOS from processing the command separator ^):
  3581.  
  3582.                    c:\> alias zap `del *.bak ^ dir /w`
  3583.  
  3584.  
  3585.  
  3586.  
  3587.  
  3588.  
  3589.  
  3590.  
  3591.  
  3592.  
  3593.  
  3594.  
  3595.  
  3596.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        50 
  3597.  
  3598.  
  3599.               Redefine the 4DOS DIR command as a variation of itself
  3600.               (wide display, including hidden and system files, pausing
  3601.               after each page):
  3602.  
  3603.                    c:\> alias dir *dir /whp
  3604.  
  3605.               Rename the 4DOS LIST command to DISPLAY, and alias LIST
  3606.               to an external program:
  3607.  
  3608.                    c:\> alias display *list
  3609.                    c:\> alias list c:\util\list.com
  3610.  
  3611.               The following examples show the use of alias arguments:
  3612.  
  3613.                    c:\> alias zap `erase %& ^ chkdsk ^ dir /w`
  3614.                    c:\> zap *.bak *.lst
  3615.  
  3616.                 This expands to:
  3617.  
  3618.                       erase *.bak *.lst ^ chkdsk ^ dir /w
  3619.  
  3620.                    c:\> alias reverse `echo %5 %4 %3 %2 %1`
  3621.                    c:\> reverse one two three four five
  3622.  
  3623.                 This expands to:
  3624.  
  3625.                       echo five four three two one
  3626.  
  3627.               The following example shows the use of IFF inside an
  3628.               alias.  The alias modifies the SET command so that if SET
  3629.               is entered with no arguments, it is replaced by a SET /P
  3630.               (pause after displaying each page).  Note the use of
  3631.               asterisks (*set) to prevent alias loops (this should be
  3632.               entered on one line):
  3633.  
  3634.                       c:\> alias set `iff "%1"=="" then *set /p^
  3635.                            else *set %&^endiff`
  3636.  
  3637.  
  3638.  
  3639.  
  3640.  
  3641.  
  3642.  
  3643.  
  3644.  
  3645.  
  3646.  
  3647.  
  3648.  
  3649.  
  3650.  
  3651.  
  3652.  
  3653.  
  3654.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        51 
  3655.  
  3656.  
  3657.   ATTRIB
  3658.  
  3659.   Syntax:     ATTRIB [/D] [-|+[AHRS]] [d:][path]filename...
  3660.  
  3661.   Purpose:    Change the file or subdirectory attributes.
  3662.  
  3663.   Comments:   ATTRIB normally only modifies file attributes.
  3664.               Specifying the /D(irectory) option will also modify
  3665.               subdirectory attributes.
  3666.  
  3667.                    +A   Set the archive attribute
  3668.                    -A   Clear the archive attribute
  3669.                    +H   Set the hidden attribute
  3670.                    -H   Clear the hidden attribute
  3671.                    +R   Set the read-only attribute
  3672.                    -R   Clear the read-only attribute
  3673.                    +S   Set the system file attribute
  3674.                    -S   Clear the system file attribute
  3675.  
  3676.               4DOS will preserve the previous file attributes and
  3677.               change only the specified attributes.  New attribute
  3678.               values are allowed between filenames; otherwise ATTRIB
  3679.               uses the same attributes specified for the previous
  3680.               file(s).  You cannot modify the directory or volume label
  3681.               attributes.
  3682.  
  3683.               You can display the file and subdirectory attributes
  3684.               using the /A option in DIR.
  3685.  
  3686.   Example:    Set the read-only and hidden attributes for the file
  3687.               MEMO:
  3688.  
  3689.                    c:\> attrib +rh memo
  3690.  
  3691.               Set the archive attribute (file has been modified) for
  3692.               MEMO, and change TEST.COM to system and not modified:
  3693.  
  3694.                    c:\> attrib +a memo +s -a test.com
  3695.  
  3696.  
  3697.  
  3698.  
  3699.  
  3700.  
  3701.  
  3702.  
  3703.  
  3704.  
  3705.  
  3706.  
  3707.  
  3708.  
  3709.  
  3710.  
  3711.  
  3712.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        52 
  3713.  
  3714.   BEEP
  3715.  
  3716.   Syntax:     BEEP [frequency duration ...]
  3717.  
  3718.   Purpose:    Beep the speaker.
  3719.  
  3720.   Comments:   BEEP is normally used in batch files to signal that an
  3721.               operation has been completed, or that the computer needs
  3722.               attention (for example, to change disks).  Because BEEP
  3723.               allows you to specify the frequency and duration, you can
  3724.               use it to play simple music.  You can specify multiple
  3725.               frequency/duration pairs on the command line.
  3726.  
  3727.               The frequency is specified in Hertz, and the duration
  3728.               in 1/18th second intervals.  No sound will be generated
  3729.               for frequencies less than 20 Hz, allowing you to insert
  3730.               short delays.  The default value for frequency is 440 Hz;
  3731.               the default value for duration is 2.
  3732.  
  3733.               The following table gives the frequency values for a
  3734.               five octave range (middle C is 523 Hz):
  3735.                _______________________________________________________
  3736.               |       |       |       |       |       |       |       |
  3737.               |   C   |   65  |  131  |  262  |  523  | 1040  | 2093  |
  3738.               |-------|-------|-------|-------|-------|-------|-------|
  3739.               | C#/Db |   69  |  139  |  277  |  554  | 1103  | 2217  |
  3740.               |-------|-------|-------|-------|-------|-------|-------|
  3741.               |   D   |   73  |  147  |  294  |  587  | 1176  | 2349  |
  3742.               |-------|-------|-------|-------|-------|-------|-------|
  3743.               | D#/Eb |   78  |  156  |  311  |  622  | 1241  | 2489  |
  3744.               |-------|-------|-------|-------|-------|-------|-------|
  3745.               |   E   |   82  |  165  |  330  |  659  | 1311  | 2637  |
  3746.               |-------|-------|-------|-------|-------|-------|-------|
  3747.               |   F   |   87  |  175  |  349  |  698  | 1391  | 2794  |
  3748.               |-------|-------|-------|-------|-------|-------|-------|
  3749.               | F#/Gb |   93  |  185  |  370  |  740  | 1488  | 2960  |
  3750.               |-------|-------|-------|-------|-------|-------|-------|
  3751.               |   G   |   98  |  196  |  392  |  784  | 1568  | 3136  |
  3752.               |-------|-------|-------|-------|-------|-------|-------|
  3753.               | G#/Ab |  104  |  208  |  415  |  831  | 1662  | 3322  |
  3754.               |-------|-------|-------|-------|-------|-------|-------|
  3755.               |   A   |  110  |  220  |  440  |  880  | 1760  | 3520  |
  3756.               |-------|-------|-------|-------|-------|-------|-------|
  3757.               | A#/Bb |  117  |  233  |  466  |  932  | 1866  | 3729  |
  3758.               |-------|-------|-------|-------|------ |-------|-------|
  3759.               |   B   |  123  |  248  |  494  |  988  | 1973  | 3951  |
  3760.               |_______|_______|_______|_______|_______|_______|_______|
  3761.  
  3762.   Example:    The following batch file fragment runs the program
  3763.               DEMO, plays a few notes, and waits for you to press a key:
  3764.  
  3765.                    demo
  3766.                    beep 440 4  600 2 1040 6
  3767.                    pause Finished with the demo - hit a key...
  3768.  
  3769.  
  3770.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        53 
  3771.  
  3772.  
  3773.   BREAK
  3774.  
  3775.   Syntax:     BREAK [on | off]
  3776.  
  3777.   Purpose:    Display, enable, or disable ^C / ^BREAK checking.
  3778.  
  3779.   Comments:   BREAK turns the ^C / ^BREAK checking on or off.  If no
  3780.               argument is given, it displays the current BREAK status.
  3781.  
  3782.               If BREAK is off, MS-DOS will only check for a ^C during
  3783.               DOS character I/O (screen, keyboard, serial port, or
  3784.               printer operations).  Many programs don't use these I/O
  3785.               functions, and it can be difficult to break out of the
  3786.               program with BREAK off.  If BREAK is on, MS-DOS will check
  3787.               for a ^C or ^BREAK during any MS-DOS operation (including
  3788.               disk I/O).
  3789.  
  3790.               BREAK defaults to OFF.  You can change the default
  3791.               BREAK setting by adding the following line to your
  3792.               CONFIG.SYS file:
  3793.  
  3794.                    break=on
  3795.  
  3796.   Example:    Check the current BREAK status:
  3797.  
  3798.                    c:\> break
  3799.                    BREAK is OFF
  3800.  
  3801.               Enable ^C checking in all MS-DOS calls:
  3802.  
  3803.                    c:\> break on
  3804.  
  3805.  
  3806.  
  3807.  
  3808.  
  3809.  
  3810.  
  3811.  
  3812.  
  3813.  
  3814.  
  3815.  
  3816.  
  3817.  
  3818.  
  3819.  
  3820.  
  3821.  
  3822.  
  3823.  
  3824.  
  3825.  
  3826.  
  3827.  
  3828.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        54 
  3829.  
  3830.  
  3831.   CALL
  3832.  
  3833.   Syntax:     CALL [d:][path]filename
  3834.  
  3835.   Purpose:    Call a secondary batch file.
  3836.  
  3837.   Comments:   CALL allows batch files to call other batch files
  3838.               (batch file nesting) without invoking a secondary copy of
  3839.               the command processor.  4DOS supports batch file nesting
  3840.               up to four levels deep.  The calling batch file is
  3841.               suspended while the called batch file runs.  When the
  3842.               called batch file finishes, the calling batch file resumes
  3843.               execution at the next command.  If you execute a batch
  3844.               file from another batch file without using CALL, the first
  3845.               batch file is terminated before the second one starts.
  3846.  
  3847.               The current ECHO state will be inherited by a called
  3848.               batch file.
  3849.  
  3850.               See also CANCEL and QUIT.
  3851.  
  3852.   Example:    The following batch file fragment compares an input
  3853.               line to "wp" and calls a secondary batch file if it
  3854.               matches:
  3855.  
  3856.                    input  Enter your choice:   %%option
  3857.                    if  "%option" == "wp"  call  wp.bat
  3858.  
  3859.  
  3860.  
  3861.  
  3862.  
  3863.  
  3864.  
  3865.  
  3866.  
  3867.  
  3868.  
  3869.  
  3870.  
  3871.  
  3872.  
  3873.  
  3874.  
  3875.  
  3876.  
  3877.  
  3878.  
  3879.  
  3880.  
  3881.  
  3882.  
  3883.  
  3884.  
  3885.  
  3886.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        55 
  3887.  
  3888.  
  3889.   CANCEL
  3890.  
  3891.   Syntax:     CANCEL
  3892.  
  3893.   Purpose:    Terminate batch file processing.
  3894.  
  3895.   Comments:   The CANCEL command will end all batch file processing,
  3896.               regardless of the batch nesting level.  (Use QUIT to end a
  3897.               nested batch file and return to the previous batch file.)
  3898.  
  3899.               You can CANCEL at any point in a batch file.
  3900.  
  3901.               See also CALL and QUIT.
  3902.  
  3903.   Example:    The following batch file fragment compares an input
  3904.               line to "end" and terminates all batch file processing if
  3905.               it matches:
  3906.  
  3907.                    input  Enter your choice:   %%option
  3908.                    if  "%option" == "end"  cancel
  3909.  
  3910.  
  3911.  
  3912.  
  3913.  
  3914.  
  3915.  
  3916.  
  3917.  
  3918.  
  3919.  
  3920.  
  3921.  
  3922.  
  3923.  
  3924.  
  3925.  
  3926.  
  3927.  
  3928.  
  3929.  
  3930.  
  3931.  
  3932.  
  3933.  
  3934.  
  3935.  
  3936.  
  3937.  
  3938.  
  3939.  
  3940.  
  3941.  
  3942.  
  3943.  
  3944.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        56 
  3945.  
  3946.  
  3947.   CD / CHDIR
  3948.  
  3949.   Syntax:     CD [d:][pathname]
  3950.                    or
  3951.               CHDIR [d:][pathname]
  3952.  
  3953.   Purpose:    Display or change the current directory.
  3954.  
  3955.   Comments:   Entering CD with no argument or only a disk drive name
  3956.               will display the current directory.  Entering CD and a
  3957.               pathname will change the current directory.
  3958.  
  3959.               Every disk drive on the system has its own current
  3960.               directory.  Specifying both a drive and a directory in the
  3961.               CD command will change the current directory on the
  3962.               specified drive, but will not change the default drive.
  3963.               Use CDD to change both the drive and directory.
  3964.  
  3965.               To start at the root directory, start the pathname with
  3966.               a backslash (\).  To start at the parent directory, start
  3967.               the pathname with two periods (..).  All other pathnames
  3968.               start at the current directory.
  3969.  
  3970.               MS-DOS will not accept directory names longer than 64
  3971.               characters.
  3972.  
  3973.               See also CDD.
  3974.  
  3975.   Example:    Change to the subdirectory C:\FINANCE\MYFILES:
  3976.  
  3977.                    c:\> cd \finance\myfiles
  3978.                    c:\finance\myfiles>
  3979.  
  3980.               Change the default directory on drive A:
  3981.  
  3982.                    c:\> cd a:\utility
  3983.  
  3984.  
  3985.  
  3986.  
  3987.  
  3988.  
  3989.  
  3990.  
  3991.  
  3992.  
  3993.  
  3994.  
  3995.  
  3996.  
  3997.  
  3998.  
  3999.  
  4000.  
  4001.  
  4002.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        57 
  4003.  
  4004.  
  4005.   CDD
  4006.  
  4007.   Syntax:     CDD [d:]pathname
  4008.  
  4009.   Purpose:    Change the current disk drive and directory.
  4010.  
  4011.   Comments:   CDD is similar to CD, except it also changes the
  4012.               default disk drive.
  4013.  
  4014.               To start at the root directory, start the pathname with
  4015.               a backslash (\).  To start at the parent directory, start
  4016.               the pathname with two periods (..).  All other pathnames
  4017.               start at the current directory.
  4018.  
  4019.               MS-DOS will not accept directory names longer than 64
  4020.               characters.
  4021.  
  4022.               See also CD.
  4023.  
  4024.   Example:    Change from the root directory on drive A to the
  4025.               subdirectory C:\WP:
  4026.  
  4027.                    a:\> cdd c:\wp
  4028.                    c:\wp>
  4029.  
  4030.  
  4031.  
  4032.  
  4033.  
  4034.  
  4035.  
  4036.  
  4037.  
  4038.  
  4039.  
  4040.  
  4041.  
  4042.  
  4043.  
  4044.  
  4045.  
  4046.  
  4047.  
  4048.  
  4049.  
  4050.  
  4051.  
  4052.  
  4053.  
  4054.  
  4055.  
  4056.  
  4057.  
  4058.  
  4059.  
  4060.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        58 
  4061.  
  4062.  
  4063.   CHCP
  4064.  
  4065.   Syntax:     CHCP [n]
  4066.  
  4067.   Purpose:    Display or change the current system code page.
  4068.  
  4069.   Comments:   Code page switching allows you to select different
  4070.               character sets for language support.  To use code page
  4071.               switching, you must have an EGA or VGA display, and MS-DOS
  4072.               3.3 or above.
  4073.  
  4074.               Before using CHCP, you must first load the device
  4075.               drivers (in CONFIG.SYS); make sure the information file
  4076.               (COUNTRY.SYS) is available; load national language support
  4077.               (using the NLSFUNC command); and prepare the specified
  4078.               code page for the devices (using the MODE command with the
  4079.               CODEPAGE PREPARE option).
  4080.  
  4081.               CHCP accepts one of the two prepared system code pages.
  4082.               An error message is displayed if a code page is selected
  4083.               that has not been prepared for the system.
  4084.  
  4085.               Entering CHCP with no arguments displays the active
  4086.               code page.
  4087.  
  4088.               See your MS-DOS manual for more information on CHCP.
  4089.  
  4090.   Example:    Display the current code page:
  4091.  
  4092.                    c:\> chcp
  4093.                    Active code page: 437
  4094.  
  4095.               Set the code page to multilingual:
  4096.  
  4097.                    c:\> chcp 850
  4098.  
  4099.  
  4100.  
  4101.  
  4102.  
  4103.  
  4104.  
  4105.  
  4106.  
  4107.  
  4108.  
  4109.  
  4110.  
  4111.  
  4112.  
  4113.  
  4114.  
  4115.  
  4116.  
  4117.  
  4118.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        59 
  4119.  
  4120.  
  4121.   CLS
  4122.  
  4123.   Syntax:     CLS [[bright] [blink] fg ON bg]
  4124.  
  4125.   Purpose:    Clear the video display, optionally to the specified
  4126.               colors.
  4127.  
  4128.   Comments:   CLS clears the display and moves the cursor to the
  4129.               upper left corner.  fg is the foreground color, bg the
  4130.               background color.  Only the first three characters of the
  4131.               color name and attributes ("bright" and "blink") are
  4132.               required.
  4133.  
  4134.               You must have ANSI.SYS (or another ANSI compatible
  4135.               screen driver) loaded to set screen colors.
  4136.  
  4137.               The available colors are:
  4138.  
  4139.                         Black     Blue      Green     Red
  4140.                         Magenta   Cyan      Yellow    White
  4141.  
  4142.               CLS is normally used in batch files to clear the screen
  4143.               before displaying text.
  4144.  
  4145.               See also COLOR.
  4146.  
  4147.   Example:    Clear the display:
  4148.  
  4149.                    c:\> cls
  4150.  
  4151.               Clear the display to a blue background, and set white
  4152.               characters as the new default:
  4153.  
  4154.                    c:\> cls white on blue
  4155.  
  4156.  
  4157.  
  4158.  
  4159.  
  4160.  
  4161.  
  4162.  
  4163.  
  4164.  
  4165.  
  4166.  
  4167.  
  4168.  
  4169.  
  4170.  
  4171.  
  4172.  
  4173.  
  4174.  
  4175.  
  4176.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        60 
  4177.  
  4178.  
  4179.   COLOR
  4180.  
  4181.   Syntax:     COLOR [bright] [blink] fg ON bg
  4182.  
  4183.   Purpose:    Set the screen display colors.
  4184.  
  4185.   Comments:   fg is the foreground color, bg the background color.
  4186.               Only the first three characters of the color name and
  4187.               attributes ("bright" and "blink") are required
  4188.  
  4189.               You must have ANSI.SYS (or another ANSI compatible
  4190.               screen driver) loaded to set screen colors.
  4191.  
  4192.               The available colors are:
  4193.  
  4194.                         Black     Blue      Green     Red
  4195.                         Magenta   Cyan      Yellow    White
  4196.  
  4197.               See also CLS and SCRPUT.
  4198.  
  4199.   Example:    Set the default screen colors to bright white text on a
  4200.               blue background:
  4201.  
  4202.                    c:\> color bright white on blue
  4203.  
  4204.  
  4205.  
  4206.  
  4207.  
  4208.  
  4209.  
  4210.  
  4211.  
  4212.  
  4213.  
  4214.  
  4215.  
  4216.  
  4217.  
  4218.  
  4219.  
  4220.  
  4221.  
  4222.  
  4223.  
  4224.  
  4225.  
  4226.  
  4227.  
  4228.  
  4229.  
  4230.  
  4231.  
  4232.  
  4233.  
  4234.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        61 
  4235.  
  4236.  
  4237.   COPY
  4238.  
  4239.   Syntax:     COPY [/MPQRUV] [d:][path]filename[+]...[/AB]
  4240.                    [[d:][path]filename][/AB]
  4241.  
  4242.   Purpose:    Copy or append one or more files.
  4243.  
  4244.   Comments:   Unlike COMMAND.COM, 4DOS allows you to copy several
  4245.               unrelated files to a target directory with a single COPY
  4246.               command.  If there are two or more arguments on the
  4247.               command line, COPY assumes the last argument is the
  4248.               target.  If there is only one argument, the target is
  4249.               assumed to be the current directory.
  4250.  
  4251.               The plus (+) tells 4DOS to append two or more files to
  4252.               a single target file.  If you don't specify a target, COPY
  4253.               will append each subsequent file to the first file.
  4254.  
  4255.               If you specify more than one source file, and the
  4256.               target is NOT a directory, COPY will automatically append
  4257.               the files to the target.
  4258.  
  4259.               The /A(SCII) and /B(inary) options apply to the
  4260.               preceding filename and to all subsequent filenames on the
  4261.               command line until another /A or /B is entered.  The other
  4262.               options (/M, /P, /Q, /R, /U, /V) apply to all filenames on
  4263.               the command line.
  4264.  
  4265.               If you use the /A option with a source filename, 4DOS
  4266.               will copy the file up to, but not including, the first ^Z
  4267.               character in the file.  If you use /A with a target
  4268.               filename, 4DOS will add a ^Z to the end of the file.  4DOS
  4269.               defaults to /A when appending files, or when the source or
  4270.               target is a device.
  4271.  
  4272.               If you use the /B option with a source filename, 4DOS
  4273.               will copy the entire file.  Using /B with a target
  4274.               filename prevents 4DOS from adding a ^Z to the end of the
  4275.               target file.  4DOS defaults to /B for normal file copies.
  4276.  
  4277.               The /M(odified) option copies only those files with the
  4278.               archive bit set (see ATTRIB).  The archive bit will NOT be
  4279.               cleared after copying.
  4280.  
  4281.               The /P(rompt) option prompts you to confirm each file
  4282.               copy (Y or N).  An N response will skip that particular
  4283.               source file.
  4284.  
  4285.  
  4286.  
  4287.  
  4288.  
  4289.  
  4290.  
  4291.  
  4292.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        62 
  4293.  
  4294.  
  4295.               The /Q(uiet) option turns off the display of the files
  4296.               copied.
  4297.  
  4298.               The /R(eplace) option prompts before overwriting an
  4299.               existing file.
  4300.  
  4301.               The /U(pdate) option copies only those source files
  4302.               that are newer than a matching target file, or where a
  4303.               matching target file doesn't exist.
  4304.  
  4305.               The /V(erify) option verifies each disk write.  This is
  4306.               the same as executing the VERIFY ON command, but is only
  4307.               active during the COPY command.
  4308.  
  4309.               See also MOVE.
  4310.  
  4311.   Example:    Copy the files MEMO1, PROJECT8.WKS, and UPDATE.BAT to
  4312.               the root directory on drive A:
  4313.  
  4314.                    c:\> copy memo1 project8.wks update.bat a:\
  4315.  
  4316.               Append the files MEMO1, MEMO2, and MEMO3, and store the
  4317.               result in BIGMEMO:
  4318.  
  4319.                    c:\> copy memo1+memo2+memo3 bigmemo
  4320.  
  4321.               Copy only those files in the root directory on drive A
  4322.               that are newer than the matching files in the current
  4323.               directory, or which don't exist in the current directory:
  4324.  
  4325.                    c:\> copy /u a:\*.* c:\*.*
  4326.  
  4327.               Copy files from the root directory on drive A to the
  4328.               current directory, but prompt before overwriting existing
  4329.               files:
  4330.  
  4331.                    c:\> copy /r a:\*.*
  4332.  
  4333.               Copy a downloadable font file to the printer in binary
  4334.               mode:
  4335.  
  4336.                    c:\> copy myfont.dat prn: /b
  4337.  
  4338.  
  4339.  
  4340.  
  4341.  
  4342.  
  4343.  
  4344.  
  4345.  
  4346.  
  4347.  
  4348.  
  4349.  
  4350.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        63 
  4351.  
  4352.  
  4353.   CTTY
  4354.  
  4355.   Syntax:     CTTY device
  4356.  
  4357.   Purpose:    Change the default console device.
  4358.  
  4359.   Comments:   At startup, 4DOS uses the keyboard as the standard
  4360.               input device and the display as the standard output
  4361.               device.  CTTY allows you to change the console (CON:) to
  4362.               another device that can perform standard character I/O.
  4363.  
  4364.               CTTY works only for those programs that use the
  4365.               standard MS-DOS I/O functions (this includes all of the
  4366.               4DOS internal commands with the exception of DRAWBOX,
  4367.               DRAWHLINE, DRAWVLINE, LIST, SCREEN, SCRPUT, and SELECT).
  4368.  
  4369.   Example:    Change the console to the first serial port:
  4370.  
  4371.                    c:\> ctty com1:
  4372.  
  4373.               Change the console back to the standard keyboard and
  4374.               display:
  4375.  
  4376.                    c:\> ctty con:
  4377.  
  4378.  
  4379.  
  4380.  
  4381.  
  4382.  
  4383.  
  4384.  
  4385.  
  4386.  
  4387.  
  4388.  
  4389.  
  4390.  
  4391.  
  4392.  
  4393.  
  4394.  
  4395.  
  4396.  
  4397.  
  4398.  
  4399.  
  4400.  
  4401.  
  4402.  
  4403.  
  4404.  
  4405.  
  4406.  
  4407.  
  4408.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        64 
  4409.  
  4410.  
  4411.   DATE
  4412.  
  4413.   Syntax:     DATE [mm-dd-yy]
  4414.  
  4415.   Purpose:    Display and (optionally) change the system date.
  4416.  
  4417.   Comments:   If you don't enter any parameters, DATE will display
  4418.               the current system date and time, and prompt for the new
  4419.               date.  Press ENTER if you don't wish to change the date,
  4420.               otherwise enter the new date.
  4421.  
  4422.               The parameters for the DATE command are:
  4423.  
  4424.                    mm (month) = 1 - 12
  4425.                    dd (day)  = 1 - 31
  4426.                    yy (year)  = 00 - 99  or 1900 - 2099
  4427.  
  4428.               You can use hyphens, slashes, or periods to separate
  4429.               the month, day, and year entries.  If you enter only two
  4430.               digits for the year and it is below 80 4DOS will assume 
  4431.               it is in the 21st century; if it is 80 or above 4DOS will
  4432.               assume it is in the 20th century.  You can specify the
  4433.               year you want explicitly by using a 4-digit value.
  4434.  
  4435.               The format for the date entry depends on the country
  4436.               code defined in the CONFIG.SYS file or by the CHCP
  4437.               command.  The default format is U.S. (mm-dd-yy).  The
  4438.               European format is dd-mm-yy; the Japanese is yy-mm-dd.
  4439.  
  4440.               See also CHCP and TIME.
  4441.  
  4442.   Example:    Enter the date from the command line:
  4443.  
  4444.                    c:\> date 12/25/89
  4445.  
  4446.               To be prompted for the date:
  4447.  
  4448.                    c:\> date
  4449.                    Mon  Dec 25, 1989  9:30:06
  4450.                    Enter new date (mm-dd-yy):
  4451.  
  4452.  
  4453.  
  4454.  
  4455.  
  4456.  
  4457.  
  4458.  
  4459.  
  4460.  
  4461.  
  4462.  
  4463.  
  4464.  
  4465.  
  4466.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        65 
  4467.  
  4468.  
  4469.   DEL / ERASE
  4470.  
  4471.   Syntax:     DEL [/PQY] [d:][path]filename...
  4472.                    or
  4473.               ERASE [/PQY] [d:][path]filename...
  4474.  
  4475.   Purpose:    Erase the specified file(s) from the disk.
  4476.  
  4477.   Comments:   If the /P(rompt) option is specified, 4DOS will prompt
  4478.               you to enter a Y or N to confirm file deletions for all
  4479.               filenames.
  4480.  
  4481.               The /Q(uiet) option turns off the display of the files
  4482.               deleted.
  4483.  
  4484.               The /Y(es) option is the reverse of /P - it assumes a Y
  4485.               response to everything, including deleting an entire
  4486.               subdirectory (*.*).  Use this option with caution!
  4487.  
  4488.               If you enter a subdirectory name, or a filename
  4489.               composed only of wildcards (* and/or ?), DEL asks for
  4490.               confirmation (Y or N), unless you specified the /Y(es)
  4491.               option.  If you respond with a Y, DEL will delete all the
  4492.               files in that subdirectory (except hidden, system, and
  4493.               read-only files).
  4494.  
  4495.   Example:    Erase all the files in the current directory with a
  4496.               .BAK or .PRN extension:
  4497.  
  4498.                    c:\> del *.bak *.prn
  4499.  
  4500.               Confirm the deletion of all files in the current
  4501.               directory with .WKS extensions:
  4502.  
  4503.                    c:\> del /P *.wks
  4504.                    Delete JAN89.WKS (Y/N)? n
  4505.                    Delete FEB88.WKS (Y/N)? y
  4506.                    Delete DEC88.WKS (Y/N)? y
  4507.  
  4508.  
  4509.  
  4510.  
  4511.  
  4512.  
  4513.  
  4514.  
  4515.  
  4516.  
  4517.  
  4518.  
  4519.  
  4520.  
  4521.  
  4522.  
  4523.  
  4524.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        66 
  4525.  
  4526.  
  4527.   DELAY
  4528.  
  4529.   Syntax:     DELAY [seconds]
  4530.  
  4531.   Purpose:    Pause for a specified length of time.
  4532.  
  4533.   Comments:   DELAY is useful in batch file loops while waiting for a
  4534.               condition to occur.  The default value is one second.
  4535.  
  4536.               You can cancel a DELAY loop by pressing ^C.
  4537.  
  4538.   Example:    Wait for 10 seconds:
  4539.  
  4540.                    delay 10
  4541.  
  4542.  
  4543.  
  4544.  
  4545.  
  4546.  
  4547.  
  4548.  
  4549.  
  4550.  
  4551.  
  4552.  
  4553.  
  4554.  
  4555.  
  4556.  
  4557.  
  4558.  
  4559.  
  4560.  
  4561.  
  4562.  
  4563.  
  4564.  
  4565.  
  4566.  
  4567.  
  4568.  
  4569.  
  4570.  
  4571.  
  4572.  
  4573.  
  4574.  
  4575.  
  4576.  
  4577.  
  4578.  
  4579.  
  4580.  
  4581.  
  4582.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        67 
  4583.  
  4584.  
  4585.   DESCRIBE
  4586.  
  4587.   Syntax:     DESCRIBE [d:][path]filename ["description"] ...
  4588.  
  4589.   Purpose:    Create, modify, or delete file and subdirectory
  4590.               descriptions.
  4591.  
  4592.   Comments:   DESCRIBE adds descriptions (up to 40 characters) to MS-
  4593.               DOS filenames and subdirectories.  The descriptions will
  4594.               be displayed when using DIR with the default single column
  4595.               option, or when using SELECT.
  4596.  
  4597.               File descriptions allow you to identify your files in
  4598.               much more meaningful ways than MS-DOS allows in an eight
  4599.               character filename.
  4600.  
  4601.               You can enter a description on the command line by
  4602.               entering the filename followed by the description enclosed
  4603.               in quotes.  Using wildcards (* and ?) and/or multiple
  4604.               filenames with a description on the command line will give
  4605.               all matching files the same description.
  4606.  
  4607.               Descriptions are stored in each directory in a hidden
  4608.               file called DESCRIPT.ION.  Use the ATTRIB command to
  4609.               "unhide" this file if you need to copy or delete it.
  4610.  
  4611.               The description file is modified appropriately whenever
  4612.               you perform an internal command (such as COPY, MOVE, DEL,
  4613.               or RENAME), but not if you use an external program (such
  4614.               as XCOPY or a shell program).
  4615.  
  4616.   Example:    Create a description for the file MEMO.TXT:
  4617.  
  4618.                    c:\> describe memo.txt
  4619.                    Describe "memo.txt" : Memo to Bob about party
  4620.  
  4621.               Enter the same description from the command line:
  4622.  
  4623.                    c:\> describe memo.txt "Memo to Bob about party"
  4624.  
  4625.  
  4626.  
  4627.  
  4628.  
  4629.  
  4630.  
  4631.  
  4632.  
  4633.  
  4634.  
  4635.  
  4636.  
  4637.  
  4638.  
  4639.  
  4640.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        68 
  4641.  
  4642.  
  4643.   DIR
  4644.  
  4645.   Syntax:     DIR [/124ACDFHJNOeirtuzPQSVWX] [[d:][path]filename[+]...]
  4646.  
  4647.   Purpose:    Display information about files and subdirectories.
  4648.  
  4649.   Comments:   DIR displays information about the files and
  4650.               subdirectories in the specified directory.  Depending upon
  4651.               the options specified, DIR can show the filename, file
  4652.               attributes, size, date and time of the most recent change
  4653.               to the file, and the file description.
  4654.  
  4655.               DIR allows wildcard characters (* and ?) in the
  4656.               filename.  If you don't specify a filename, DIR defaults
  4657.               to *.* (display all files and subdirectories in the
  4658.               current directory).
  4659.  
  4660.               If you append filenames with a +, 4DOS will display the
  4661.               matching filenames in a single directory listing.
  4662.  
  4663.               If a country code was defined in the CONFIG.SYS file or
  4664.               by the CHCP command, DIR will display the date in the
  4665.               format for that country.  The default date format is U.S.
  4666.               (mm-dd-yy).
  4667.  
  4668.               DIR can handle directories of any size, limited only by
  4669.               the available memory.  Each filename requires 32 bytes of
  4670.               DOS memory plus the size of the description (if any); a
  4671.               system with 128K of free DOS memory can display up to
  4672.               4,000 files per directory.
  4673.  
  4674.               Options on the command line apply only to the filenames
  4675.               which follow the option, except that options at the end of
  4676.               the line apply to the preceding filename only.  This
  4677.               allows you to specify several options for a group of
  4678.               files, and retains compatibility with COMMAND.COM when a
  4679.               single filename is specified.
  4680.  
  4681.               The DIR options are:
  4682.  
  4683.                  1  Single column display - display the filename, size,
  4684.                       date, time, and description.  This is the default.
  4685.                  2  Two column display - display the filename, size,
  4686.                       date, and time.
  4687.                  4  Four column display - display the filename and size
  4688.                       (in K(ilobytes) or M(egabytes).
  4689.  
  4690.  
  4691.  
  4692.  
  4693.  
  4694.  
  4695.  
  4696.  
  4697.  
  4698.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        69 
  4699.  
  4700.  
  4701.                  A  Display filenames and attributes (see ATTRIB), in
  4702.                       the format RHSA, where:
  4703.                             R   Read-only
  4704.                             H   Hidden
  4705.                             S   System
  4706.                             A   Archive
  4707.                       When displaying attributes, DIR cannot also
  4708.                       display file descriptions.
  4709.                  C  Display filenames in upper case (like COMMAND.COM).
  4710.                       See also SETDOS /U.
  4711.                  D  Display contents of the current directory and all of
  4712.                       its subdirectories.  DIR will only display headers
  4713.                       and summaries for those directories with matching
  4714.                       filenames.
  4715.                  F  Display files only (no subdirectories).
  4716.                  H  Display all files, including hidden and system
  4717.                       files.
  4718.                  J  Justify filenames (same format as COMMAND.COM).
  4719.                  N  Reset DIR options to the default values (useful when
  4720.                       displaying some files in one format, and then
  4721.                       changing back to the default format).
  4722.                  O? Sort sequence, where ? can be any combination of the
  4723.                       following options:
  4724.                             e   Sort by extension
  4725.                             i   Sort by the file description (see
  4726.                                  DESCRIBE)
  4727.                             r   Reverse the normal sort order
  4728.                             t   Sort by time (oldest first)
  4729.                             u   Unsorted (same as COMMAND.COM)
  4730.                             z   Sort by size
  4731.                         The default sort is by filename.
  4732.                  P  Pause after each screen page and wait for a key to
  4733.                       be pressed (useful for displaying long directory
  4734.                       listings).
  4735.                  Q  Suppress header line and summaries, and display file
  4736.                       or subdirectory names only, in a single column
  4737.                       (useful when redirecting output to a file or
  4738.                       another program).
  4739.                  S  Display summary only (number of files & bytes used).
  4740.                  V  Display filenames sorted vertically rather than
  4741.                       horizontally (with the /2, /4, or /W option).
  4742.                  W  Wide display - display the filenames only,
  4743.                       horizontally across the screen (5 columns on an
  4744.                       80-character display).
  4745.                  X  Display subdirectories only.
  4746.  
  4747.                  See also DESCRIBE and SELECT.
  4748.  
  4749.  
  4750.  
  4751.  
  4752.  
  4753.  
  4754.  
  4755.  
  4756.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        70 
  4757.  
  4758.  
  4759.   Example:    Display the .WKS files, and then the .WK1 files in the
  4760.               current directory:
  4761.  
  4762.                    c:\> dir *.wks *.wk1
  4763.  
  4764.               Display the .WKS and .WK1 files together:
  4765.  
  4766.                    c:\> dir *.wks+*.wk1
  4767.  
  4768.               Display all the files on drive C, including hidden and
  4769.               system files, pausing after each page:
  4770.  
  4771.                    c:\> dir /dhp c:\*.*
  4772.  
  4773.  
  4774.  
  4775.  
  4776.  
  4777.  
  4778.  
  4779.  
  4780.  
  4781.  
  4782.  
  4783.  
  4784.  
  4785.  
  4786.  
  4787.  
  4788.  
  4789.  
  4790.  
  4791.  
  4792.  
  4793.  
  4794.  
  4795.  
  4796.  
  4797.  
  4798.  
  4799.  
  4800.  
  4801.  
  4802.  
  4803.  
  4804.  
  4805.  
  4806.  
  4807.  
  4808.  
  4809.  
  4810.  
  4811.  
  4812.  
  4813.  
  4814.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        71 
  4815.  
  4816.  
  4817.   DIRS
  4818.  
  4819.   Syntax:     DIRS
  4820.  
  4821.   Purpose:    Display the current directory stack.
  4822.  
  4823.   Comments:   DIRS displays the directory stack used by PUSHD and
  4824.               POPD (most recent entries first).  The directory stack
  4825.               holds up to 255 characters (about 10 to 20 entries).
  4826.  
  4827.               See also PUSHD and POPD.
  4828.  
  4829.   Example:    Change directories and then display the directory
  4830.               stack:
  4831.  
  4832.                    c:\> pushd c:\database
  4833.                    c:\database> pushd d:\wordp\memos
  4834.                    d:\wordp\memos> dirs
  4835.                    c:\database
  4836.                    c:\
  4837.  
  4838.  
  4839.  
  4840.  
  4841.  
  4842.  
  4843.  
  4844.  
  4845.  
  4846.  
  4847.  
  4848.  
  4849.  
  4850.  
  4851.  
  4852.  
  4853.  
  4854.  
  4855.  
  4856.  
  4857.  
  4858.  
  4859.  
  4860.  
  4861.  
  4862.  
  4863.  
  4864.  
  4865.  
  4866.  
  4867.  
  4868.  
  4869.  
  4870.  
  4871.  
  4872.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        72 
  4873.  
  4874.  
  4875.   DRAWBOX
  4876.  
  4877.   Syntax:     DRAWBOX ulrow ulcol lrrow lrcol style [bright] [blink] fg
  4878.                  ON bg [FILL bgfill]
  4879.  
  4880.   Purpose:    Draw a box on the screen.
  4881.  
  4882.   Comments:   DRAWBOX is useful for creating attractive screen
  4883.               displays in batch files.  DRAWBOX detects other lines and
  4884.               boxes on the display, and creates the appropriate
  4885.               connector characters when possible (not all types of lines
  4886.               can be connected with the available characters).
  4887.  
  4888.               The row and column are zero-based, so on a standard 25
  4889.               line by 80 column display, valid rows are 0 - 24 and valid
  4890.               columns are 0 - 79.
  4891.  
  4892.               The parameters are:
  4893.  
  4894.                    ulrow   Row for upper left corner
  4895.                    ulcol   Column for upper left corner
  4896.                    lrrow   Row for lower right corner
  4897.                    lrcol   Column for lower right corner
  4898.                    style   Box drawing style:
  4899.                                 0 - borderless
  4900.                                 1 - single line
  4901.                                 2 - double line
  4902.                                 3 - single line on top and bottom,
  4903.                                        double on sides
  4904.                                 4 - double line on top and bottom,
  4905.                                        single on sides
  4906.                    fg      Foreground character color
  4907.                    bg      Background character color
  4908.                    bgfill  Background fill color (for the inside of the
  4909.                               box)
  4910.  
  4911.               Only the first three characters of the color name and
  4912.               attributes ("bright" and "blink") are required.  The
  4913.               available colors are:
  4914.  
  4915.                         Black     Blue      Green     Red
  4916.                        Magenta   Cyan      Yellow    White
  4917.  
  4918.               See also DRAWHLINE and DRAWVLINE.
  4919.  
  4920.   Example:    Draw a single line box around the entire screen with
  4921.               bright white lines on a blue background:
  4922.  
  4923.                    drawbox 0 0 24 79 1 bright white on blue fill blue
  4924.  
  4925.  
  4926.  
  4927.  
  4928.  
  4929.  
  4930.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        73 
  4931.  
  4932.  
  4933.   DRAWHLINE
  4934.  
  4935.   Syntax:     DRAWHLINE row column len style [bright] [blink] fg ON bg
  4936.  
  4937.   Purpose:    Draw a horizontal line on the screen.
  4938.  
  4939.   Comments:   DRAWHLINE is useful for creating attractive screen
  4940.               displays in batch files.  DRAWHLINE detects other lines
  4941.               and boxes on the display, and creates the appropriate
  4942.               connector characters when possible (not all types of lines
  4943.               can be connected with the available characters).
  4944.  
  4945.               The row and column are zero-based, so on a standard 25
  4946.               line by 80 column display, valid rows are 0 - 24 and valid
  4947.               columns are 0 - 79.
  4948.  
  4949.               The parameters are:
  4950.  
  4951.                            row      Start row
  4952.                            column   Start column
  4953.                            len      Length of line
  4954.                            style    Line drawing style:
  4955.                                        1 - single line
  4956.                                        2 - double line
  4957.                            fg       Foreground character color
  4958.                            bg       Background character color
  4959.  
  4960.               Only the first three characters of the color name and
  4961.               attributes ("bright" and "blink") are required.  The
  4962.               available colors are:
  4963.  
  4964.                         Black     Blue      Green     Red
  4965.                         Magenta   Cyan      Yellow    White
  4966.  
  4967.               See also DRAWBOX and DRAWVLINE.
  4968.  
  4969.   Example:    Draw a double line along the top row of the display
  4970.               with green characters on a blue background:
  4971.  
  4972.                    drawhline 0 0 79 2 green on blue
  4973.  
  4974.  
  4975.  
  4976.  
  4977.  
  4978.  
  4979.  
  4980.  
  4981.  
  4982.  
  4983.  
  4984.  
  4985.  
  4986.  
  4987.  
  4988.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        74 
  4989.  
  4990.  
  4991.   DRAWVLINE
  4992.  
  4993.   Syntax:     DRAWVLINE row column len style [bright][blink] fg ON bg
  4994.  
  4995.   Purpose:    Draw a vertical line on the screen.
  4996.  
  4997.   Comments:   DRAWVLINE is useful for creating attractive screen
  4998.               displays in batch files.  DRAWVLINE detects other lines
  4999.               and boxes on the display, and creates the appropriate
  5000.               connector characters when possible (not all types of lines
  5001.               can be connected with the available characters).
  5002.  
  5003.               The row and column are zero-based, so on a standard 25
  5004.               line by 80 column display, valid rows are 0 - 24 and valid
  5005.               columns are 0 - 79.
  5006.  
  5007.                  The parameters are:
  5008.  
  5009.                            row      Start row
  5010.                            column   Start column
  5011.                            len      Length of line
  5012.                            style    Line drawing style:
  5013.                                        1 - single line
  5014.                                        2 - double line
  5015.                            fg       Foreground character color
  5016.                            bg       Background character color
  5017.  
  5018.               Only the first three characters of the color name and
  5019.               attributes ("bright" and "blink") are required.  The
  5020.               available colors are:
  5021.  
  5022.                         Black     Blue      Green     Red
  5023.                         Magenta   Cyan      Yellow    White
  5024.  
  5025.               See also DRAWBOX and DRAWHLINE.
  5026.  
  5027.   Example:    Draw a double width line along the left margin of the
  5028.               display with bright red characters on a black background:
  5029.  
  5030.                    drawvline 0 0 24 2 bright red on black
  5031.  
  5032.  
  5033.  
  5034.  
  5035.  
  5036.  
  5037.  
  5038.  
  5039.  
  5040.  
  5041.  
  5042.  
  5043.  
  5044.  
  5045.  
  5046.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        75 
  5047.  
  5048.  
  5049.   ECHO
  5050.  
  5051.   Syntax:     ECHO [on | off | message]
  5052.  
  5053.   Purpose:    Display the echo status, enable or disable batch file
  5054.               or command line echoing, or display a message.
  5055.  
  5056.   Comments:   4DOS defaults to ECHO ON in batch files.  To prevent a
  5057.               line from being echoed, preface it with the @ symbol.  You
  5058.               can default to ECHO OFF by setting the variable VERBOSE to
  5059.               0 (see SETDOS).  The current ECHO state is inherited by
  5060.               called batch files.
  5061.  
  5062.               4DOS defaults to ECHO OFF during keyboard input.  If
  5063.               you set ECHO ON from the command line, 4DOS will display
  5064.               the fully parsed and expanded commands (including aliases
  5065.               and variables) before they are executed.  The keyboard
  5066.               ECHO state is independent of the batch file ECHO state;
  5067.               changing ECHO in a batch file has no effect on the display
  5068.               at the command prompt, and vice versa.
  5069.  
  5070.               If no arguments are entered, ECHO displays the current
  5071.               echo status (ON or OFF).
  5072.  
  5073.               ECHO commands in a batch file will send messages to the
  5074.               screen while the batch file executes, even if ECHO is set
  5075.               OFF.   You cannot use the command separator character or
  5076.               the 4DOS redirection symbols (| > <) in an ECHO message,
  5077.               unless you enclose them in quotes or precede them with the
  5078.               escape character.
  5079.  
  5080.               See also SCREEN, SCRPUT, SETDOS and TEXT.
  5081.  
  5082.   Example:    Enable command line echoing:
  5083.  
  5084.                    c:\> echo on
  5085.  
  5086.               Display a message in a batch file:
  5087.  
  5088.                    echo Processing your print files...
  5089.  
  5090.               Turn off batch file echoing, without displaying ECHO
  5091.               itself:
  5092.  
  5093.                    @echo off
  5094.  
  5095.  
  5096.  
  5097.  
  5098.  
  5099.  
  5100.  
  5101.  
  5102.  
  5103.  
  5104.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        76 
  5105.  
  5106.  
  5107.   ENDLOCAL
  5108.  
  5109.   Syntax:     ENDLOCAL
  5110.  
  5111.   Purpose:    Restore the saved disk drive, directory, environment
  5112.               variables and aliases.
  5113.  
  5114.   Comment:    ENDLOCAL restores the disk drive, directory,
  5115.               environment variables and aliases saved by the previous
  5116.               SETLOCAL command.  SETLOCAL and ENDLOCAL can only be used
  5117.               in batch files, not in aliases.
  5118.  
  5119.               See also SETLOCAL.
  5120.  
  5121.   Example:    This batch file fragment saves the drive, current
  5122.               working directory, environment variables and aliases,
  5123.               changes the drive and directory, modifies some environment
  5124.               variables, runs the program TEST1, and then restores the
  5125.               original values:
  5126.  
  5127.                    setlocal
  5128.                    cdd d:\test
  5129.                    set path=c:\;c:\dos;c:\util
  5130.                    set lib=d:\lib
  5131.                    test1
  5132.                    endlocal
  5133.  
  5134.  
  5135.  
  5136.  
  5137.  
  5138.  
  5139.  
  5140.  
  5141.  
  5142.  
  5143.  
  5144.  
  5145.  
  5146.  
  5147.  
  5148.  
  5149.  
  5150.  
  5151.  
  5152.  
  5153.  
  5154.  
  5155.  
  5156.  
  5157.  
  5158.  
  5159.  
  5160.  
  5161.  
  5162.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        77 
  5163.  
  5164.  
  5165.   ESET
  5166.  
  5167.   Syntax:     ESET varname...
  5168.  
  5169.   Purpose:    Edit environment variables and/or aliases.
  5170.  
  5171.   Comments:   ESET allows you to edit your environment variables and
  5172.               aliases using the 4DOS line editing commands (see Command
  5173.               Line Editing in Using 4DOS).  The cursor will be
  5174.               positioned at the first character of the variable or
  5175.               alias.
  5176.  
  5177.               ESET will search for environment variables first, and
  5178.               then aliases.  If you have an environment variable and an
  5179.               alias with the same name (a bad idea!), ESET will only be
  5180.               able to edit the environment variable.
  5181.  
  5182.               4DOS limits environment variable and alias names to 80
  5183.               characters, and their arguments to 255 characters.
  5184.  
  5185.               See also ALIAS, UNALIAS, SET, and UNSET.
  5186.  
  5187.   Example:    Edit the MS-DOS executable file search path:
  5188.  
  5189.                    c:\> eset path
  5190.                    path=c:\;c:\dos;c:\util
  5191.  
  5192.               Create and then edit an alias:
  5193.  
  5194.                    c:\> alias d dir /djp
  5195.                    c:\> eset d
  5196.                    d=dir /djp
  5197.  
  5198.  
  5199.  
  5200.  
  5201.  
  5202.  
  5203.  
  5204.  
  5205.  
  5206.  
  5207.  
  5208.  
  5209.  
  5210.  
  5211.  
  5212.  
  5213.  
  5214.  
  5215.  
  5216.  
  5217.  
  5218.  
  5219.  
  5220.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        78 
  5221.  
  5222.  
  5223.   EXCEPT
  5224.  
  5225.   Syntax:     EXCEPT ([d:][path]filename...) command [args...]
  5226.  
  5227.   Purpose:    Perform a command, except on the file(s) specified.
  5228.  
  5229.   Comments:   EXCEPT provides a means of executing a command on a
  5230.               group of files and/or subdirectories, except those
  5231.               enclosed within the parentheses.
  5232.  
  5233.               The command can be a 4DOS internal command or alias, an
  5234.               external command, or a batch file.
  5235.  
  5236.               You may use the wildcard characters (? and *) in a
  5237.               filename.
  5238.  
  5239.               When using filename completion (see Command Line
  5240.               Editing in Using 4DOS) to get the filenames inside the
  5241.               parentheses, type a space after the open parenthesis
  5242.               before entering a partial filename or pressing F9.
  5243.               Otherwise the command line editor will treat the open
  5244.               parenthesis as the first character of the filename to be
  5245.               completed.
  5246.  
  5247.               EXCEPT prevents operations on the specified file(s) by
  5248.               setting the hidden attribute, performing the command, and
  5249.               then clearing the hidden attribute.  If EXCEPT is aborted
  5250.               in an unusual way, you may need to use the ATTRIB command
  5251.               to "unhide" (-H) the file(s).
  5252.  
  5253.               EXCEPT will not work with programs or commands that
  5254.               ignore the hidden attribute.
  5255.  
  5256.               See also ATTRIB.
  5257.  
  5258.   Example:    Erase all the files in the current directory, except
  5259.               those beginning with MEMO and those ending in .WKS:
  5260.  
  5261.                    c:\> except (memo*.* *.wks) erase *.*
  5262.  
  5263.               Copy all the files and subdirectories except those in
  5264.               C:\MSC and C:\DOS on drive C to drive D:
  5265.  
  5266.                    c:\> except (c:\msc c:\dos) xcopy c:\*.* d:\ /s
  5267.  
  5268.  
  5269.  
  5270.  
  5271.  
  5272.  
  5273.  
  5274.  
  5275.  
  5276.  
  5277.  
  5278.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        79 
  5279.  
  5280.  
  5281.   EXIT
  5282.  
  5283.   Syntax:     EXIT [n]
  5284.  
  5285.   Purpose:    Return from a secondary command processor.
  5286.  
  5287.   Comments:   Some application programs will start a secondary copy
  5288.               of the command processor to allow you to execute MS-DOS
  5289.               commands.  To return to the application again, type EXIT.
  5290.  
  5291.               If you include a numeric value after the EXIT command, 4DOS
  5292.               will return this value to the calling program as the error
  5293.               level.  If the value is not specified, the error level from
  5294.               the most recently executed external program is returned.
  5295.               If no external program has been executed, 0 is returned.
  5296.  
  5297.               You cannot EXIT from the primary command processor.
  5298.  
  5299.   Example:    Return to the previous command processor or
  5300.               application:
  5301.  
  5302.                    c:\> exit
  5303.  
  5304.  
  5305.  
  5306.  
  5307.  
  5308.  
  5309.  
  5310.  
  5311.  
  5312.  
  5313.  
  5314.  
  5315.  
  5316.  
  5317.  
  5318.  
  5319.  
  5320.  
  5321.  
  5322.  
  5323.  
  5324.  
  5325.  
  5326.  
  5327.  
  5328.  
  5329.  
  5330.  
  5331.  
  5332.  
  5333.  
  5334.  
  5335.  
  5336.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        80 
  5337.  
  5338.  
  5339.   FOR
  5340.  
  5341.   Syntax:     FOR %var IN (set) [DO] command ...
  5342.  
  5343.   Purpose:    Repeat a command for several variables.
  5344.  
  5345.   Comments:   4DOS sets var sequentially to each member of (set), and
  5346.               then evaluates and executes command for every argument in
  5347.               (set).  If one of the arguments in (set) contains MS-DOS
  5348.               wildcard characters (* and ?), var will be set
  5349.               sequentially to each matching filename on the disk.
  5350.  
  5351.               The command can be a 4DOS internal command or alias, an
  5352.               external command, or a batch file.
  5353.  
  5354.               In COMMAND.COM, you must use a single % for the
  5355.               variable name from the command line, and %% when in a
  5356.               batch file.  4DOS will accept either % or %% in either
  5357.               case.
  5358.  
  5359.               COMMAND.COM requires the variable name to be a single
  5360.               character; 4DOS supports variable names up to 80
  5361.               characters.
  5362.  
  5363.               COMMAND.COM requires the word "DO" on the command line;
  5364.               it is optional in 4DOS.
  5365.  
  5366.               Note that 4DOS supports nested FOR statements;
  5367.               COMMAND.COM does not.
  5368.  
  5369.   Example:    The following example compiles the C programs in the
  5370.               current directory that have a 2 or a 3 somewhere in their
  5371.               name:
  5372.  
  5373.                    c:\msc> for %a in ( *2*.c *3*.c ) do cl %a ;
  5374.  
  5375.               The following example uses variable functions to delete
  5376.               the .BAK files for which a corresponding .TXT file exists
  5377.               in the current directory (this should be entered on one
  5378.               line):
  5379.  
  5380.                    c:\docs> for %file in (*.txt) if exist
  5381.                      %@name[%file].bak del %@name[%file].bak
  5382.  
  5383.  
  5384.  
  5385.  
  5386.  
  5387.  
  5388.  
  5389.  
  5390.  
  5391.  
  5392.  
  5393.  
  5394.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        81 
  5395.  
  5396.  
  5397.   FREE
  5398.  
  5399.   Syntax:     FREE [d:]...
  5400.  
  5401.   Purpose:    Display the total disk space, total bytes used, and
  5402.               total bytes free on the specified (or default) drive(s).
  5403.  
  5404.   Comments:   FREE provides the same disk information as the external
  5405.               MS-DOS command CHKDSK, but without the wait.
  5406.  
  5407.               See also MEMORY.
  5408.  
  5409.   Example:    Display the status of the current drive:
  5410.  
  5411.                            c:\> free
  5412.                              Volume in drive C: is DEVELOPMENT
  5413.                              42,496,000 bytes total disk space
  5414.                              36,851,712 bytes used
  5415.                              5,644,288 bytes free
  5416.  
  5417.               Display the status of drives A and C:
  5418.  
  5419.                            c:\> free a: c:
  5420.                              Volume in drive A: is unlabeled
  5421.                              1,213,952 bytes total disk space
  5422.                              1,115,136 bytes used
  5423.                              98,816 bytes free
  5424.                              Volume in drive C: is DEVELOPMENT
  5425.                              42,496,000 bytes total disk space
  5426.                              36,851,712 bytes used
  5427.                              5,644,288 bytes free
  5428.  
  5429.  
  5430.  
  5431.  
  5432.  
  5433.  
  5434.  
  5435.  
  5436.  
  5437.  
  5438.  
  5439.  
  5440.  
  5441.  
  5442.  
  5443.  
  5444.  
  5445.  
  5446.  
  5447.  
  5448.  
  5449.  
  5450.  
  5451.  
  5452.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        82 
  5453.  
  5454.  
  5455.   GLOBAL
  5456.  
  5457.   Syntax:     GLOBAL [/IQ] command [args]
  5458.  
  5459.   Purpose:    Execute a command in the current directory and its
  5460.               subdirectories.
  5461.  
  5462.   Comments:   GLOBAL performs the command first in the current
  5463.               directory,  and then in every subdirectory under the
  5464.               current directory.
  5465.  
  5466.               The command can be a 4DOS internal command or alias, an
  5467.               external command, or a batch file.
  5468.  
  5469.               GLOBAL will terminate if the command returns a non-zero
  5470.               exit code, unless you specify the /I(gnore result) switch.
  5471.  
  5472.               GLOBAL will display the current directory unless you specify
  5473.               the /Q(uiet) switch.
  5474.  
  5475.   Example:    Erase all the files with a .BAK extension in every
  5476.               directory on C:
  5477.  
  5478.                    c:\> global erase *.bak
  5479.  
  5480.               Copy the files in every directory on drive A to the
  5481.               directory C:\TEMP :
  5482.  
  5483.                    a:\> global copy *.* c:\temp
  5484.  
  5485.  
  5486.  
  5487.  
  5488.  
  5489.  
  5490.  
  5491.  
  5492.  
  5493.  
  5494.  
  5495.  
  5496.  
  5497.  
  5498.  
  5499.  
  5500.  
  5501.  
  5502.  
  5503.  
  5504.  
  5505.  
  5506.  
  5507.  
  5508.  
  5509.  
  5510.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        83 
  5511.  
  5512.  
  5513.   GOSUB
  5514.  
  5515.   Syntax:     GOSUB label
  5516.  
  5517.   Purpose:    Call a subroutine in a batch file.
  5518.  
  5519.   Comments:   GOSUB calls the specified label as a subroutine.  The
  5520.               subroutine must end with a RETURN statement.  After the
  5521.               RETURN, 4DOS will continue processing with the command
  5522.               following the GOSUB command.
  5523.  
  5524.               If the label doesn't exist, the batch file is
  5525.               terminated with the error message "Label not found."
  5526.  
  5527.               The label must begin with a colon (:), and appear by
  5528.               itself on the line.  4DOS ignores case differences when
  5529.               matching labels.
  5530.  
  5531.               See also GOTO and RETURN.
  5532.  
  5533.   Example:    The following batch file fragment calls a subroutine
  5534.               which displays the directory and returns:
  5535.  
  5536.                    echo Calling a subroutine
  5537.                    gosub subr1
  5538.                    echo Returned from the subroutine
  5539.                    quit
  5540.                    :subr1
  5541.                    dir /hw
  5542.                    return
  5543.  
  5544.  
  5545.  
  5546.  
  5547.  
  5548.  
  5549.  
  5550.  
  5551.  
  5552.  
  5553.  
  5554.  
  5555.  
  5556.  
  5557.  
  5558.  
  5559.  
  5560.  
  5561.  
  5562.  
  5563.  
  5564.  
  5565.  
  5566.  
  5567.  
  5568.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        84 
  5569.  
  5570.  
  5571.   GOTO
  5572.  
  5573.   Syntax:     GOTO label
  5574.  
  5575.   Purpose:    Continue batch file processing at the line following
  5576.               the label.
  5577.  
  5578.   Comments:   GOTO changes the current position in the batch file to
  5579.               the line immediately following the label.  If the label
  5580.               doesn't exist, the batch file is terminated with the error
  5581.               message "Label not found."
  5582.  
  5583.               The label must begin with a colon (:), and appear by
  5584.               itself on the line.  4DOS ignores case differences when
  5585.               matching labels.
  5586.  
  5587.               To avoid errors in the processing of nested IFF statements,
  5588.               GOTO cancels all active IFF statements.  This means that to
  5589.               avoid errors GOTOs inside IFF statements must branch
  5590.               entirely outside all IFF blocks which are active at the time
  5591.               of the GOTO.
  5592.  
  5593.               See also GOSUB.
  5594.  
  5595.   Example:    The following batch file fragment checks for the
  5596.               existence of the file CONFIG.SYS.  If the file exists,
  5597.               4DOS jumps to C_EXISTS and copies all the files from the
  5598.               current directory to the root directory on A.  If
  5599.               CONFIG.SYS doesn't exist, 4DOS prints an error message and
  5600.               exits.
  5601.  
  5602.                    if exist config.sys goto C_EXISTS
  5603.                    echo CONFIG.SYS doesn't exist - exiting.
  5604.                    quit
  5605.                    :C_EXISTS
  5606.                    copy *.* a:\
  5607.  
  5608.  
  5609.  
  5610.  
  5611.  
  5612.  
  5613.  
  5614.  
  5615.  
  5616.  
  5617.  
  5618.  
  5619.  
  5620.  
  5621.  
  5622.  
  5623.  
  5624.  
  5625.  
  5626.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        85 
  5627.  
  5628.  
  5629.   HELP
  5630.  
  5631.   Syntax:     HELP [/BW] [/R] [topic]
  5632.  
  5633.   Purpose:    Provide help for 4DOS and MS-DOS commands.
  5634.  
  5635.   Comments:   The HELP command displays the proper syntax and a brief
  5636.               description of 4DOS and MS-DOS commands.  You can also
  5637.               call HELP by pressing F1 at the 4DOS prompt.
  5638.  
  5639.               If you enter HELP with no topic, HELP will display all
  5640.               the commands it can help you with.  Select a topic using
  5641.               the cursor keys and press ENTER.  For help on a specific
  5642.               command, enter HELP followed by the command name.
  5643.  
  5644.               The /BW switch forces HELP to monochrome mode on color
  5645.               systems.  The /R switch turns off dynamic window resizing
  5646.               and forces all HELP screens to full screen size regardless
  5647.               of the amount of text they contain.  HELP switches may be
  5648.               set permanently by setting the values in the 4HELPC
  5649.               environment variable (e.g. SET 4HELPC=/BW).
  5650.  
  5651.               Detailed information on how to use the HELP system is
  5652.               provided with HELP itself.  Once you have started HELP,
  5653.               follow the instructions on the screen regarding the
  5654.               effects of various keys.
  5655.  
  5656.               HELP.EXE and DOS.HLP must be in the current directory or
  5657.               one of the directories specified in the PATH environment
  5658.               variable.  If you change the name of HELP.EXE or keep the
  5659.               help files in a directory which is not on your PATH, you
  5660.               must store the full path and filename for the help program
  5661.               in the 4HELP environment variable.  To specify a text file
  5662.               name other than DOS.HLP, store the full path and filename for
  5663.               the help text file in the 4HELPF environment variable.
  5664.  
  5665.               The HELPCFG program included with 4DOS allows you to
  5666.               customize HELP's colors to suit your own preferences.
  5667.  
  5668.               If you want to customize the help text (for example, to
  5669.               add HELP for your own commands or aliases), you will need
  5670.               the 4DOS Utility Disk (available from JP Software) which
  5671.               contains the source text and hypertext compiler.
  5672.  
  5673.               HELP is an external command.
  5674.  
  5675.   Example:    Display and select from all the available help topics:
  5676.  
  5677.                    c:\> help
  5678.  
  5679.               For help on COPY:
  5680.  
  5681.                    c:\> help copy
  5682.  
  5683.  
  5684.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        86 
  5685.  
  5686.  
  5687.   HISTORY
  5688.  
  5689.   Syntax:     HISTORY [/F] [/R [d:][path]filename]
  5690.  
  5691.   Purpose:    Display, clear, or read the history list.
  5692.  
  5693.   Comments:   If no parameters are entered, HISTORY will display the
  5694.               current history list.
  5695.  
  5696.               The /F(ree) option clears the command history list.
  5697.  
  5698.               The /R(ead) option loads the command history from the
  5699.               specified file.  You can save the history list by
  5700.               redirecting its output to a file.
  5701.  
  5702.               The number of commands saved in the history list
  5703.               depends on the length of each command line.  The history
  5704.               list size can be specified at startup from 512 to 8192
  5705.               characters (see Installation).  The default size is 1024
  5706.               characters.
  5707.  
  5708.               You can disable saving commands to the history list, or
  5709.               specify a minimum command line length to save, with the
  5710.               SETDOS /H command.
  5711.  
  5712.               See also SETDOS.
  5713.  
  5714.   Example:    Display the history list:
  5715.  
  5716.                    c:\> history
  5717.  
  5718.               Clear the history entries:
  5719.  
  5720.                    c:\> history /f
  5721.  
  5722.               Save the history list to the file HISTFILE, and then
  5723.               read it in again:
  5724.  
  5725.                    c:\> history > histfile
  5726.                    c:\> history /r histfile
  5727.  
  5728.  
  5729.  
  5730.  
  5731.  
  5732.  
  5733.  
  5734.  
  5735.  
  5736.  
  5737.  
  5738.  
  5739.  
  5740.  
  5741.  
  5742.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        87 
  5743.  
  5744.  
  5745.   IF
  5746.  
  5747.   Syntax:     IF [NOT] condition command
  5748.  
  5749.   Purpose:    Allow conditional execution of commands.
  5750.  
  5751.   Comments:   4DOS first tests the given condition.  If the condition
  5752.               is true, 4DOS executes the specified command, otherwise
  5753.               the command will be ignored.  If you use the NOT option,
  5754.               the command is executed only when the condition is false.
  5755.               IF statements can be nested.
  5756.  
  5757.               The command can be a 4DOS internal command or alias, an
  5758.               external command, or a batch file.
  5759.  
  5760.               For the string tests, case differences are ignored.  When
  5761.               comparing strings, you should enclose the strings in double
  5762.               quotes (see examples).  If both arguments to be compared
  5763.               begin with digits, IF will do a numeric comparison; otherwise
  5764.               IF does an ASCII comparison.
  5765.  
  5766.               The condition can be any of the following:
  5767.  
  5768.                  string1 == string2
  5769.                  string1 EQ string2
  5770.                       If string1 is equal to string2, the condition is
  5771.                       true.
  5772.  
  5773.                  string1 NE string2
  5774.                       If string1 is not equal to string2, the condition
  5775.                       is true.
  5776.  
  5777.                  string1 LT string2
  5778.                       If string1 is < string2, the condition is true.
  5779.  
  5780.                  string1 LE string2
  5781.                       If string1 is <= string2, the condition is true.
  5782.  
  5783.                  string1 GE string2
  5784.                       If string1 is >= string2, the condition is true.
  5785.  
  5786.                  string1 GT string2
  5787.                       If string1 is > string2, the condition is true.
  5788.  
  5789.           In the tests below, the term "condition" refers to one of
  5790.          the relational operators described above (==, NE, LT, etc.).
  5791.  
  5792.  
  5793.  
  5794.  
  5795.  
  5796.  
  5797.  
  5798.  
  5799.  
  5800.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        88 
  5801.  
  5802.  
  5803.                  ATTRIB [d:][path]filename [RHSVDA]
  5804.                       If the file has matching attributes, the condition
  5805.                       is true.  See also ATTRIB and DIR.  The attributes
  5806.                       are :
  5807.  
  5808.                            R  Read-only
  5809.                            H  Hidden
  5810.                            S  System
  5811.                            V  Volume
  5812.                            D  Directory
  5813.                            A  Archive
  5814.                            N  No attributes set
  5815.  
  5816.                       For the volume name test the filename used must
  5817.                       refer to the root directory.  Volume names longer
  5818.                       than 8 characters require a period after the eigth
  5819.                       character (e.g. IF ATTRIB A:\MYFILES0.107 V ...).
  5820.  
  5821.                  DISKFREE condition n[K | M]
  5822.                       Test for the free disk space on the current drive.
  5823.  
  5824.                  DOSMEM condition n[K]
  5825.                       Test for the free DOS memory.
  5826.  
  5827.                  EMS condition n[K | M]
  5828.                       Test for the amount of free expanded memory.
  5829.  
  5830.                  EXTENDED condition n[K | M]
  5831.                       Test for the amount of extended memory (non-XMS).
  5832.  
  5833.                  ERRORLEVEL [condition] n
  5834.                       Test the exit code of the preceding external
  5835.                       program.  ERRORLEVEL supports the same conditions
  5836.                       as the string comparisons (for example, ==, LE,
  5837.                       etc.).  If no condition is specified, the default
  5838.                       is GE.  NOTE:  Not all programs return an explicit
  5839.                       exit code.  In those cases, the behavior of
  5840.                       ERRORLEVEL is undefined.
  5841.  
  5842.                  EXIST [d:][path]filename
  5843.                       If the file exists, the condition is true.  You
  5844.                       can use wildcard characters (* and ?) in the
  5845.                       filename, in which case the condition is true if
  5846.                       any file matching the wildcards exists.
  5847.  
  5848.                  FILESIZE filename condition n[K | M]
  5849.                       Test for the size of the specified file.
  5850.  
  5851.                  ISALIAS aliasname
  5852.                       If the specified name is an alias, the condition
  5853.                       is true.
  5854.  
  5855.  
  5856.  
  5857.  
  5858.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        89 
  5859.  
  5860.  
  5861.                  ISDIR [d:]path
  5862.                       If the subdirectory exists, the condition is true.
  5863.  
  5864.                  MONITOR condition [MONO | COLOR]
  5865.                       Test for the monitor type (condition should be ==,
  5866.                       EQ, or NE).
  5867.  
  5868.                  VIDEO condition [MONO | CGA | EGA | VGA]
  5869.                       Test for the video card type (condition should be
  5870.                       ==, EQ, or NE).
  5871.  
  5872.                  XMS condition n[K | M]
  5873.                       Test for the amount of available XMS 2.0 extended
  5874.                       memory.
  5875.  
  5876.               The DOSFREE, EMS, EXTENDED, and XMS tests allow testing
  5877.               either by bytes (default), kilobytes (by appending a K to
  5878.               the test value), or megabytes (by appending an M).
  5879.  
  5880.               See also IFF.
  5881.  
  5882.   Example:    Test for the presence of A:\JAN.DOC, and copy it to the
  5883.               root directory on drive C if it exists:
  5884.  
  5885.                    c:\> if exist a:\jan.doc copy a:\jan.doc c:\
  5886.  
  5887.               This batch file fragment tests for a string value:
  5888.  
  5889.                    input  "Enter your selection : "  %%cmd
  5890.                    if  "%cmd" == "WP"  goto  wordproc
  5891.                    if  "%cmd" NE "GRAPHICS"  goto  badentry
  5892.  
  5893.               Test for more than 500K of free DOS memory:
  5894.  
  5895.                    c:\> if dosfree gt 500K echo More than 500K free
  5896.  
  5897.               Test for expanded memory greater than 2 Mb:
  5898.  
  5899.                    c:\> if ems gt 2M echo More than 2 Mb EMS available
  5900.  
  5901.               Run a program ("MONOPROG") if the monitor type is
  5902.               monochrome:
  5903.  
  5904.                    c:\> if monitor==mono monoprog
  5905.  
  5906.               This batch file fragment tests to see if the disk in
  5907.               drive A is labeled "INSTALL1":
  5908.  
  5909.                    if attrib a:\install1 V goto INSTALL1
  5910.  
  5911.  
  5912.  
  5913.  
  5914.  
  5915.  
  5916.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        90 
  5917.  
  5918.  
  5919.   IFF
  5920.  
  5921.   Syntax:     IFF [NOT] condition THEN ^ ... ^ ELSE[[IFF] ... THEN] ^
  5922.                   ... ^ ENDIFF
  5923.  
  5924.   Purpose:    Allow IF/THEN/ELSE conditional execution of commands.
  5925.  
  5926.   Comments:   4DOS first tests the given condition.  If the condition
  5927.               is true, 4DOS executes the specified command(s) until the
  5928.               next ELSE, ELSEIFF, or ENDIFF, otherwise the command(s)
  5929.               will be ignored and 4DOS will continue parsing at the next
  5930.               ELSE, ELSEIFF, or ENDIFF.  If you use the NOT option,
  5931.               commands are executed only when the condition is false.
  5932.               IFF statements can be nested up to 15 levels deep.
  5933.  
  5934.               The command can be a 4DOS internal command or alias, an
  5935.               external command, or a batch file.
  5936.  
  5937.               See the IF command for a list of the tests available.
  5938.  
  5939.   Example:    The following batch file fragment tests the monitor
  5940.               type (monochrome or color), and sets the appropriate
  5941.               colors and prompt (the PROMPT commands should be entered
  5942.               on one line):
  5943.  
  5944.                    iff monitor==color then
  5945.                      color bright white on blue ^ cls
  5946.                      prompt=$e[s$e[1;1f$e[41;1;37m$e[K  Path:
  5947.                        $p$e[u$e[44;37m$n$g
  5948.                    else
  5949.                      prompt=$e[s$e[1;1f$e[0;7m$e[K  Path:
  5950.                        $p$e[u$e[0m$n$g
  5951.                    endiff
  5952.  
  5953.               The following alias checks to see if the argument is a
  5954.               subdirectory.  If so, the alias deletes the subdirectory's
  5955.               files and removes it (enter this on one line):
  5956.  
  5957.                    c:\> alias zap `iff isdir %1 then ^ del %1 ^ rd %1 ^
  5958.                      else ^ echo Not a directory! ^ endiff`
  5959.  
  5960.  
  5961.  
  5962.  
  5963.  
  5964.  
  5965.  
  5966.  
  5967.  
  5968.  
  5969.  
  5970.  
  5971.  
  5972.  
  5973.  
  5974.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        91 
  5975.  
  5976.  
  5977.   INKEY
  5978.  
  5979.   Syntax:     INKEY [/Wn] [text] %%varname
  5980.  
  5981.   Purpose:    Get a single keystroke environment variable from
  5982.               standard input.
  5983.  
  5984.   Comments:   You can optionally display prompt text before the
  5985.               variable name.
  5986.  
  5987.               The /W(ait) option allows you to specify a timeout
  5988.               period, where n is the number of seconds to wait for a
  5989.               response.  If no keystroke is entered by the end of the
  5990.               timeout period, INKEY returns with the variable unchanged.
  5991.               You can specify /W0 to check if a key is already in the
  5992.               buffer, and return immediately.
  5993.  
  5994.               ASCII values from 1 to 255 are stored as a character.
  5995.               Extended characters (for example, function keys and cursor
  5996.               keys) are stored as a string in decimal format, with a
  5997.               leading @ (for example, the F1 key is @59).  This is the
  5998.               same format used by the KEYSTACK command.  See Appendix C
  5999.               for a list of the extended key codes.
  6000.  
  6001.               INKEY and INPUT are normally used in batch files,
  6002.               allowing you great flexibility in entering or changing
  6003.               batch variables.
  6004.  
  6005.               If you press ^C or ^BREAK while INKEY is waiting for a
  6006.               key, execution of an alias will be terminated, and
  6007.               execution of a batch file will be suspended while you are
  6008.               prompted whether to cancel the batch job (see Batch Files
  6009.               in Using 4DOS).
  6010.  
  6011.               See also INPUT.
  6012.  
  6013.   Example:    The following batch file fragment prompts for a
  6014.               character and stores it in the variable NUM:
  6015.  
  6016.                    inkey  Enter a number from 1 to 9:  %%num
  6017.  
  6018.               The following batch file fragment waits up to 10
  6019.               seconds for a character, then tests to see if a "Y" was
  6020.               entered (the INKEY command should be entered on one line):
  6021.  
  6022.                    set net=N
  6023.                    inkey /w10 Do you want to load the network (Y/N)?
  6024.                       %%net
  6025.                    if "%net" == "Y" goto load_net
  6026.  
  6027.  
  6028.  
  6029.  
  6030.  
  6031.  
  6032.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        92 
  6033.  
  6034.  
  6035.   INPUT
  6036.  
  6037.   Syntax:     INPUT [/Wn] [text] %%varname
  6038.  
  6039.   Purpose:    Enter an environment variable from the standard input.
  6040.  
  6041.   Comments:   You can optionally display prompt text before the
  6042.               variable name.
  6043.  
  6044.               The /W(ait) option allows you to specify a timeout
  6045.               period, where n is the number of seconds to wait for a
  6046.               response.  If no keystroke is entered by the end of the
  6047.               timeout period, INPUT returns with the variable unchanged.
  6048.               If you enter a key before the timeout period, INPUT will
  6049.               wait indefinitely for the remainder of the line.  You can
  6050.               specify /W0 to check if a key is already in the buffer,
  6051.               and return immediately.
  6052.  
  6053.               All characters entered up to, but not including, the
  6054.               carriage return are stored in the variable.
  6055.  
  6056.               INPUT and INKEY are normally used in batch files,
  6057.               allowing you great flexibility in entering or changing
  6058.               batch variables.
  6059.  
  6060.               See also INKEY.
  6061.  
  6062.   Example:    The following batch file fragment prompts for a string
  6063.               and stores it in the variable FNAME:
  6064.  
  6065.                    input  Enter the file name:  %%fname
  6066.  
  6067.  
  6068.  
  6069.  
  6070.  
  6071.  
  6072.  
  6073.  
  6074.  
  6075.  
  6076.  
  6077.  
  6078.  
  6079.  
  6080.  
  6081.  
  6082.  
  6083.  
  6084.  
  6085.  
  6086.  
  6087.  
  6088.  
  6089.  
  6090.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        93 
  6091.  
  6092.   KEYSTACK
  6093.  
  6094.   Syntax:     KEYSTACK ["abc"] [nn] [@nn] [!]
  6095.  
  6096.   Purpose:    Feed keystrokes to a program from a batch file or
  6097.               alias.
  6098.  
  6099.   Comments:   Characters entered within double quotes ("abc") will be
  6100.               stored "as is" in the keyboard buffer.  Numbers (nn) not
  6101.               enclosed in quotes are ASCII decimal codes (e.g., 13
  6102.               (ENTER), or 27 (ESCAPE)).  The number 0 is a special case;
  6103.               it is used with programs that flush the keyboard buffer
  6104.               (it tells the program the buffer is clear, so subsequent
  6105.               keystrokes will be accepted normally).  Numbers preceded
  6106.               by @ are extended keyboard codes generated by the Alt key,
  6107.               cursor pad keys, and the Function keys (e.g., @59 is the
  6108.               F1 function key).  See Appendix C for a list of the
  6109.               extended key codes.  A ! will clear all pending keystrokes,
  6110.               both in the KEYSTACK buffer and in the keyboard buffer.
  6111.  
  6112.               Some programs require both the keyboard "scan code" and the
  6113.               ASCII code to be stacked.  To stack both codes calculate the
  6114.               value ((256 * scan) + ASCII) and use that for KEYSTACK.  For
  6115.               example for ENTER the scan code is 28 and the ASCII code is
  6116.               13, so to stack both values use KEYSTACK 7181 (7181 is 256 *
  6117.               28 + 13).  Scan code tables are available in many PC
  6118.               reference books.
  6119.  
  6120.               You can store a maximum of 255 characters.
  6121.  
  6122.               Each time KEYSTACK is executed, it will clear any
  6123.               remaining keystrokes stored by a previous KEYSTACK.
  6124.  
  6125.               You may need to experiment a bit with your programs to
  6126.               find the proper sequence of keystrokes.  Programs that
  6127.               bypass MS-DOS and the BIOS for keyboard input cannot read
  6128.               keystrokes entered with KEYSTACK.
  6129.  
  6130.               KEYSTACK requires the device driver KEYSTACK.SYS be
  6131.               loaded in the CONFIG.SYS file (see Installation).
  6132.  
  6133.   Example:    The following batch file starts Lotus 1-2-3 and loads
  6134.               the file specified on the command line:
  6135.  
  6136.                    pushd c:\123
  6137.                    keystack 0 13 0 13 0 13 0 13 0 13 "/FR" 0 "%1" 13
  6138.                    123
  6139.                    popd
  6140.  
  6141.               The same command defined as an alias (enter this on one
  6142.               line):
  6143.  
  6144.                    alias 321 `pushd c:\123 ^ keystack 0 13 0 13 0 13 0
  6145.                      13 0 13 "/FR" 0 "%1" 13 ^ 123 ^ popd`
  6146.  
  6147.  
  6148.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        94 
  6149.  
  6150.  
  6151.   LIST
  6152.  
  6153.   Syntax:     LIST [/HSW] [d:][path]filename...
  6154.  
  6155.   Purpose:    Display a file with forward and backward paging and
  6156.               scrolling.
  6157.  
  6158.   Comments:   LIST provides a much faster and more flexible way to view a
  6159.               file than TYPE, without the overhead of using a text editor.
  6160.  
  6161.               The /H option strips the high bit from each character
  6162.               before displaying.  This is useful when displaying files
  6163.               created by some word processors that turn on the high bit
  6164.               for formatting purposes.
  6165.  
  6166.               The /S option will read from the standard input rather than
  6167.               a file.  This allows you to redirect command output and view
  6168.               it with LIST.
  6169.  
  6170.               The /W option will wrap the text at the right margin.  This
  6171.               option is useful when displaying non-text files.
  6172.  
  6173.               LIST uses the cursor pad to scroll through the file.  The
  6174.               following keys have special meanings (the caret ^ means
  6175.               press the Control key together with with the specified key):
  6176.  
  6177.                  Home           Display the first page of the file.
  6178.                  End            Display the last page of the file.
  6179.                  Esc            Exit the current file.
  6180.                  ^C             Quit LIST.
  6181.                  Up Arrow       Scroll up one line.
  6182.                  Down Arrow     Scroll down one line.
  6183.                  Left Arrow     Scroll left 8 columns.
  6184.                  Right Arrow    Scroll right 8 columns.
  6185.                  ^Left Arrow    Scroll left 40 columns.
  6186.                  ^Right Arrow   Scroll right 40 columns.
  6187.                  F1             Call the on-line help (HELP.EXE).
  6188.                  F              Prompt and search for a string (case is
  6189.                                   ignored).
  6190.                  N              Find next matching string (case is
  6191.                                   ignored).  LIST saves the search
  6192.                                   string, so you can LIST multiple files
  6193.                                   and search for the same string simply
  6194.                                   by pressing N in each file.
  6195.                  P              Print the file on LPT1.
  6196.  
  6197.               LIST is normally only useful for displaying ASCII text
  6198.               files; executable files (.COM and .EXE) and many data
  6199.               files will be unreadable due to the presence of non-
  6200.               alphanumeric characters.
  6201.  
  6202.               See also TYPE.
  6203.  
  6204.  
  6205.  
  6206.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        95 
  6207.  
  6208.  
  6209.   Example:    Display the file MEMO.DOC:
  6210.  
  6211.                    c:\> list memo.doc
  6212.  
  6213.               Display the output from a DIR command:
  6214.  
  6215.                    c:\> dir | list /s
  6216.  
  6217.               Redefine the DIR command to always display its output
  6218.               via LIST:
  6219.  
  6220.                    c:\> alias dir `*dir %& | list /s`
  6221.  
  6222.  
  6223.  
  6224.  
  6225.  
  6226.  
  6227.  
  6228.  
  6229.  
  6230.  
  6231.  
  6232.  
  6233.  
  6234.  
  6235.  
  6236.  
  6237.  
  6238.  
  6239.  
  6240.  
  6241.  
  6242.  
  6243.  
  6244.  
  6245.  
  6246.  
  6247.  
  6248.  
  6249.  
  6250.  
  6251.  
  6252.  
  6253.  
  6254.  
  6255.  
  6256.  
  6257.  
  6258.  
  6259.  
  6260.  
  6261.  
  6262.  
  6263.  
  6264.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        96 
  6265.  
  6266.  
  6267.   LOG
  6268.  
  6269.   Syntax:     LOG [/W [d:][path]filename | ON | OFF | text]
  6270.  
  6271.   Purpose:    Save a log of commands to a disk file.
  6272.  
  6273.   Comments:   LOG defaults to saving to the file 4DOSLOG in the root
  6274.               directory of the boot drive.
  6275.  
  6276.               Entering LOG with no parameters displays the log status
  6277.               (ON or OFF).  Entering LOG with text writes the text to
  6278.               the log file, even if LOG is set OFF.  This allows you to
  6279.               enter headers in the log file.
  6280.  
  6281.               You can specify a different filename with the /W(rite)
  6282.               switch.  The /W switch automatically enables command
  6283.               logging.
  6284.  
  6285.               The commands are stored in the log file as they were
  6286.               entered, before performing any alias or variable
  6287.               expansion.
  6288.  
  6289.               The LOG file format looks like:
  6290.  
  6291.                    [mm/dd/yy  hh:mm:ss]  command
  6292.  
  6293.   Example:    Display the LOG status:
  6294.  
  6295.                    c:\> log
  6296.                    LOG is OFF
  6297.  
  6298.               Enable command logging:
  6299.  
  6300.                    c:\> log on
  6301.  
  6302.               Enable command logging to the file C:\LOG\LOGFILE and
  6303.               insert a header:
  6304.  
  6305.                    c:\> log /w c:\log\logfile
  6306.                    c:\> log "Started work on the database system"
  6307.  
  6308.  
  6309.  
  6310.  
  6311.  
  6312.  
  6313.  
  6314.  
  6315.  
  6316.  
  6317.  
  6318.  
  6319.  
  6320.  
  6321.  
  6322.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        97 
  6323.  
  6324.  
  6325.   MD / MKDIR
  6326.  
  6327.   Syntax:     MD [d:]pathname...
  6328.                    or
  6329.               MKDIR [d:]pathname...
  6330.  
  6331.   Purpose:    Create subdirectories.
  6332.  
  6333.   Comments:   To start at the root directory, start the pathname with
  6334.               a backslash (\).  To start at the parent directory, start
  6335.               the pathname with two periods (..).  All other pathnames
  6336.               start at the current directory.
  6337.  
  6338.               The longest allowable path in MS-DOS from the root
  6339.               directory to any subdirectory is 64 characters (including
  6340.               backslashes).
  6341.  
  6342.               See also RD.
  6343.  
  6344.   Example:    Create a subdirectory called MYDIR in the root
  6345.               directory:
  6346.  
  6347.                    c:\> md \mydir
  6348.  
  6349.               Create a subdirectory called DIRTWO in the current
  6350.               directory:
  6351.  
  6352.                    c:\mydir> md dirtwo
  6353.  
  6354.  
  6355.  
  6356.  
  6357.  
  6358.  
  6359.  
  6360.  
  6361.  
  6362.  
  6363.  
  6364.  
  6365.  
  6366.  
  6367.  
  6368.  
  6369.  
  6370.  
  6371.  
  6372.  
  6373.  
  6374.  
  6375.  
  6376.  
  6377.  
  6378.  
  6379.  
  6380.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        98 
  6381.  
  6382.  
  6383.   MEMORY
  6384.  
  6385.   Syntax:     MEMORY
  6386.  
  6387.   Purpose:    Display the system RAM status.
  6388.  
  6389.   Comments:   MEMORY displays the total RAM, the free RAM (available
  6390.               to applications programs after loading MS-DOS, device
  6391.               drivers, 4DOS itself, and RAM resident programs); the
  6392.               total and free expanded memory, extended memory and XMS
  6393.               memory (on an 80286 or 80386); the total and free
  6394.               environment space; the total and free alias list space;
  6395.               and the total command history space.
  6396.  
  6397.               If you compare the free RAM displayed by MEMORY with
  6398.               the free RAM displayed by CHKDSK and some memory map
  6399.               programs, MEMORY will usually show a slightly higher
  6400.               value.  The difference is the size of the environment
  6401.               passed to these external programs;  most memory mapping
  6402.               programs do not count the passed environment as free
  6403.               space.
  6404.  
  6405.   Example:    Display your RAM totals:
  6406.  
  6407.                    c:\> memory
  6408.                    655,360 bytes total RAM
  6409.                    534,464 bytes free
  6410.  
  6411.                    1,687,552 bytes total EMS memory
  6412.                    1,097,728 bytes free
  6413.  
  6414.                    914,432 bytes total XMS memory
  6415.  
  6416.                    512 bytes total environment
  6417.                    195 bytes free
  6418.  
  6419.                    1,024 bytes total alias
  6420.                    452 bytes free
  6421.  
  6422.                    1,024 bytes total history
  6423.  
  6424.  
  6425.  
  6426.  
  6427.  
  6428.  
  6429.  
  6430.  
  6431.  
  6432.  
  6433.  
  6434.  
  6435.  
  6436.  
  6437.  
  6438.   4DOS Reference Manual         Copyright 1991, JP Software Inc.        99 
  6439.  
  6440.  
  6441.   MOVE
  6442.  
  6443.   Syntax:     MOVE [/PQR] [d:][path]filename... [d:][path]filename
  6444.  
  6445.   Purpose:    Move files to other directories and drives.
  6446.  
  6447.   Comments:   The MOVE command moves the specified file(s) to the last
  6448.               filename specified, which is designated as the target.  If
  6449.               the target already exists, it is deleted when the file is
  6450.               moved.  You cannot move a file to a character device or to
  6451.               itself.
  6452.  
  6453.               If there is more than one source file specification,
  6454.               the target must be a directory, and the files are moved to
  6455.               the directory with their original filenames.  If the
  6456.               target is not a directory, MOVE will display an error
  6457.               message and exit.
  6458.  
  6459.               Use caution when using MOVE with commands like SELECT.
  6460.               If multiple files are SELECTed and the target is not a
  6461.               subdirectory, each file will be moved in turn to the
  6462.               target, overwriting the previous file.  The net result is
  6463.               that all files but the last will be deleted.  If SELECT is
  6464.               invoked using square brackets instead of parentheses, the
  6465.               MOVE will be done in a single command and MOVE will detect
  6466.               the error.
  6467.  
  6468.               The /P(rompt) option will prompt you for a Y or N
  6469.               response to confirm each move.
  6470.  
  6471.               The /Q(uiet) option turns off the display of the files moved.
  6472.  
  6473.               The /R(eplace) option will prompt you for a Y or N
  6474.               response before overwriting an existing file.
  6475.  
  6476.               MOVE first attempts to rename the file(s).  If that
  6477.               fails (the target is on a different drive, or the target
  6478.               already exists), MOVE will copy the file(s) and then
  6479.               delete the originals.  If MOVE cannot delete the original
  6480.               (for example, a read-only file), it will display an error
  6481.               message, but the target file is still created.
  6482.  
  6483.               See also COPY and RENAME.
  6484.  
  6485.  
  6486.  
  6487.  
  6488.  
  6489.  
  6490.  
  6491.  
  6492.  
  6493.  
  6494.  
  6495.  
  6496.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       100 
  6497.  
  6498.  
  6499.   Example:    Move some files to a different directory:
  6500.  
  6501.                    c:\> move *.wks *.txt c:\finance\myfiles
  6502.  
  6503.               Move all the files in the current directory to A:\,
  6504.               prompting before overwriting any existing files:
  6505.  
  6506.                    c:\> move /r *.* a:\
  6507.  
  6508.  
  6509.  
  6510.  
  6511.  
  6512.  
  6513.  
  6514.  
  6515.  
  6516.  
  6517.  
  6518.  
  6519.  
  6520.  
  6521.  
  6522.  
  6523.  
  6524.  
  6525.  
  6526.  
  6527.  
  6528.  
  6529.  
  6530.  
  6531.  
  6532.  
  6533.  
  6534.  
  6535.  
  6536.  
  6537.  
  6538.  
  6539.  
  6540.  
  6541.  
  6542.  
  6543.  
  6544.  
  6545.  
  6546.  
  6547.  
  6548.  
  6549.  
  6550.  
  6551.  
  6552.  
  6553.  
  6554.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       101 
  6555.  
  6556.  
  6557.   PATH
  6558.  
  6559.   Syntax:     PATH [[d:]path;[d:]path...]]
  6560.  
  6561.   Purpose:    Tells 4DOS where to search for executable and batch
  6562.               files not in the current directory.
  6563.  
  6564.   Comments:   When searching for an external command (.COM, .EXE,
  6565.               .BTM, and .BAT), 4DOS searches the current directory
  6566.               first, then the directories you specify in the order you
  6567.               list them.  The directory names are separated by
  6568.               semicolons (;).  Like COMMAND.COM, 4DOS shifts the entire
  6569.               path to upper case before storing it in the environment.
  6570.               This maintains compatibility with programs which can only
  6571.               recognize an upper case path.
  6572.  
  6573.               If you enter PATH with no parameters, 4DOS displays the
  6574.               current search path.  If you enter PATH and a semicolon,
  6575.               4DOS clears the search path and will search only the
  6576.               current directory (this is the default at system startup).
  6577.  
  6578.               If you specify an invalid directory, 4DOS will skip
  6579.               that directory and continue searching with the next
  6580.               directory in the path.
  6581.  
  6582.               Some applications use the PATH variable to search for
  6583.               their files.
  6584.  
  6585.               You can edit the path with the ESET command.
  6586.  
  6587.   Example:    The following PATH command directs 4DOS to search for
  6588.               an executable file in the following order: the current
  6589.               directory, the root directory on C, the DOS subdirectory
  6590.               on C, and the UTIL subdirectory on C:
  6591.  
  6592.                    c:\> path c:\;c:\dos;c:\util
  6593.  
  6594.               Display the current search path:
  6595.  
  6596.                    c:\> path
  6597.                    PATH=C:\;C:\DOS;C:\UTIL
  6598.  
  6599.  
  6600.  
  6601.  
  6602.  
  6603.  
  6604.  
  6605.  
  6606.  
  6607.  
  6608.  
  6609.  
  6610.  
  6611.  
  6612.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       102 
  6613.  
  6614.  
  6615.   PAUSE
  6616.  
  6617.   Syntax:     PAUSE [message]
  6618.  
  6619.   Purpose:    Suspend alias or batch file execution.
  6620.  
  6621.   Comments:   A PAUSE command will suspend execution, giving you the
  6622.               opportunity to perform activities such as changing disks,
  6623.               turning on the printer, etc.
  6624.  
  6625.               PAUSE flushes the keyboard buffer, and then waits for
  6626.               any key (except ^C or ^BREAK) to be pressed and then
  6627.               continues executing.  If a prompt message is specified,
  6628.               4DOS will display the message and wait for a keystroke.
  6629.               Otherwise, 4DOS will prompt:
  6630.  
  6631.                    Press a key when ready...
  6632.  
  6633.               If you press ^C or ^BREAK while PAUSE is waiting for a
  6634.               key, execution of an alias will be terminated, and
  6635.               execution of a batch file will be suspended while you are
  6636.               prompted whether to cancel the batch job (see Batch Files
  6637.               in Using 4DOS).
  6638.  
  6639.   Example:    The following batch file fragment prompts the user
  6640.               before erasing files:
  6641.  
  6642.                    pause ^C aborts, any other key erases the .LST files
  6643.                    erase *.lst
  6644.  
  6645.  
  6646.  
  6647.  
  6648.  
  6649.  
  6650.  
  6651.  
  6652.  
  6653.  
  6654.  
  6655.  
  6656.  
  6657.  
  6658.  
  6659.  
  6660.  
  6661.  
  6662.  
  6663.  
  6664.  
  6665.  
  6666.  
  6667.  
  6668.  
  6669.  
  6670.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       103 
  6671.  
  6672.  
  6673.   POPD
  6674.  
  6675.   Syntax:     POPD [*]
  6676.  
  6677.   Purpose:    Change to the disk drive and directory at the top of
  6678.               the directory stack.
  6679.  
  6680.   Comments:   POPD restores the disk drive and directory saved using
  6681.               PUSHD (most recent first).
  6682.  
  6683.               The * option clears the directory stack, without
  6684.               changing the current drive and directory.
  6685.  
  6686.               Use the DIRS command to display the directory stack.
  6687.  
  6688.               See also DIRS and PUSHD.
  6689.  
  6690.   Example:    Save and change your disk drive and directory with
  6691.               PUSHD, and then restore it:
  6692.  
  6693.                    c:\> pushd d:\database\test
  6694.                    d:\database\test> pushd c:\wordp\memos
  6695.                    c:\wordp\memos> pushd a:\123
  6696.                    a:\123> popd
  6697.                    c:\wordp\memos> popd
  6698.                    d:\database\test> popd
  6699.                    c:\>
  6700.  
  6701.               Clear the directory stack:
  6702.  
  6703.                    c:\> popd *
  6704.  
  6705.  
  6706.  
  6707.  
  6708.  
  6709.  
  6710.  
  6711.  
  6712.  
  6713.  
  6714.  
  6715.  
  6716.  
  6717.  
  6718.  
  6719.  
  6720.  
  6721.  
  6722.  
  6723.  
  6724.  
  6725.  
  6726.  
  6727.  
  6728.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       104 
  6729.  
  6730.  
  6731.   PROMPT
  6732.  
  6733.   Syntax:     PROMPT [text]
  6734.  
  6735.   Purpose:    Change the 4DOS command line prompt.
  6736.  
  6737.   Comments:   If you enter PROMPT with no arguments, 4DOS sets the
  6738.               prompt on drives A and B to $n$g, and on all other drives
  6739.               to $p$g (display current disk and directory).
  6740.  
  6741.               The prompt text can contain special strings of the form
  6742.               $?, where ? is one of the following characters.
  6743.  
  6744.                  b   The | character
  6745.                  c   The open parenthesis (
  6746.                  d   Current date, in the format Tue  Jan 1, 1991 (US
  6747.                      and Japan) or Tue  1. Jan 1991 (Europe)
  6748.                  e   The ASCII ESC character (decimal 27)
  6749.                  f   The close parenthesis )
  6750.                  g   The > character
  6751.                  h   BACKSPACE over the previous character
  6752.                  l   The < character
  6753.                  n   Default drive letter
  6754.                  P   Current disk and directory (upper case)
  6755.                  p   Current disk and directory (lower case)
  6756.                  q   The = character
  6757.                  s   The space character
  6758.                  t   Current time, in the format hh:mm:ss
  6759.                  v   MS-DOS version number, in the format 3.10
  6760.                  Xd: Current disk and directory (upper case) where d is
  6761.                       the drive specification
  6762.                  xd: Current disk and directory (lower case) where d is
  6763.                       the drive specification
  6764.                  z   Display the current 4DOS shell nesting level (you
  6765.                       must be running 4DOS as the primary shell in
  6766.                       swapping mode).  The primary command processor is
  6767.                       0.  Resident copies of 4DOS return a 99 for the
  6768.                       shell nesting level.
  6769.                  $   The $ character
  6770.                  _   CR/LF (go to beginning of new line)
  6771.  
  6772.  
  6773.  
  6774.  
  6775.  
  6776.  
  6777.  
  6778.  
  6779.  
  6780.  
  6781.  
  6782.  
  6783.  
  6784.  
  6785.  
  6786.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       105 
  6787.  
  6788.  
  6789.               Under COMMAND.COM, it is possible to use the PROMPT
  6790.               command in a batch file to transmit ANSI.SYS control
  6791.               sequences to the screen (for example, to redefine function
  6792.               keys).  This is because COMMAND.COM displays a prompt when
  6793.               echoing lines in a batch file.  This technique will not
  6794.               work with 4DOS, because 4DOS doesn't display a prompt
  6795.               within batch files; hence the characters in the PROMPT
  6796.               string are never sent to ANSI.SYS.  To send ANSI sequences
  6797.               in 4DOS, use the ECHO command, substituting e (control-X
  6798.               followed by an e) for $e in the PROMPT string.
  6799.  
  6800.   Example:    Set the prompt to the current date and time:
  6801.  
  6802.                    c:\> prompt $d $t $g
  6803.                    Mon  Dec 25, 1989 18:29:19 >
  6804.  
  6805.               Set a prompt using ANSI escape sequences to display the
  6806.               shell level, date, time and path in color on the top line
  6807.               (enter as one line):
  6808.  
  6809.                    c:\> prompt $e[s$e[1;1f$e[41;1;37m$e[K[$z] $d  Time:
  6810.                         $t$h$h$h  Path: $p$e[u$e[0;32m$n$g
  6811.  
  6812.  
  6813.  
  6814.  
  6815.  
  6816.  
  6817.  
  6818.  
  6819.  
  6820.  
  6821.  
  6822.  
  6823.  
  6824.  
  6825.  
  6826.  
  6827.  
  6828.  
  6829.  
  6830.  
  6831.  
  6832.  
  6833.  
  6834.  
  6835.  
  6836.  
  6837.  
  6838.  
  6839.  
  6840.  
  6841.  
  6842.  
  6843.  
  6844.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       106 
  6845.  
  6846.  
  6847.   PUSHD
  6848.  
  6849.   Syntax:     PUSHD [[d:]pathname]
  6850.  
  6851.   Purpose:    Save the current disk drive and directory.
  6852.  
  6853.   Comments:   PUSHD saves the current disk and directory on the
  6854.               directory stack, and if a pathname is specified on the
  6855.               command line, changes the disk drive and directory.  The
  6856.               directory stack can hold up to 255 characters (about 10 to
  6857.               20 entries).  If you exceed the directory stack size, the
  6858.               oldest directory is removed before adding the current
  6859.               directory.
  6860.  
  6861.               The saved directory is restored on a "last in, first
  6862.               out" basis by the POPD command.  The directory stack can
  6863.               be displayed with the DIRS command.
  6864.  
  6865.               See also CDD, DIRS and POPD.
  6866.  
  6867.   Example:    Save the current directory and change to C:\WORDP\MEMOS:
  6868.  
  6869.                    c:\> pushd \wordp\memos
  6870.                    c:\wordp\memos>
  6871.  
  6872.               Save the current drive and directory, without changing
  6873.               directories:
  6874.  
  6875.                    c:\> pushd
  6876.                    c:\>
  6877.  
  6878.  
  6879.  
  6880.  
  6881.  
  6882.  
  6883.  
  6884.  
  6885.  
  6886.  
  6887.  
  6888.  
  6889.  
  6890.  
  6891.  
  6892.  
  6893.  
  6894.  
  6895.  
  6896.  
  6897.  
  6898.  
  6899.  
  6900.  
  6901.  
  6902.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       107 
  6903.  
  6904.  
  6905.   QUIT
  6906.  
  6907.   Syntax:     QUIT
  6908.  
  6909.   Purpose:    Terminate the current batch file.
  6910.  
  6911.   Comments:   You can QUIT at any point in a batch file, not just at
  6912.               the end.
  6913.  
  6914.               If you QUIT a batch file called from another batch
  6915.               file, you will be returned to the previous file at the
  6916.               line following the original call.  To end all batch file
  6917.               processing, use CANCEL.
  6918.  
  6919.               See also CANCEL.
  6920.  
  6921.   Example:    This batch file fragment checks to see if the user
  6922.               entered "quit" and exits if true.
  6923.  
  6924.                    input  Enter your choice :  %%option
  6925.                    if  "%option" == "quit"  quit
  6926.  
  6927.  
  6928.  
  6929.  
  6930.  
  6931.  
  6932.  
  6933.  
  6934.  
  6935.  
  6936.  
  6937.  
  6938.  
  6939.  
  6940.  
  6941.  
  6942.  
  6943.  
  6944.  
  6945.  
  6946.  
  6947.  
  6948.  
  6949.  
  6950.  
  6951.  
  6952.  
  6953.  
  6954.  
  6955.  
  6956.  
  6957.  
  6958.  
  6959.  
  6960.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       108 
  6961.  
  6962.  
  6963.   RD / RMDIR
  6964.  
  6965.   Syntax:     RD [d:]path...
  6966.                     or
  6967.               RMDIR [d:]path...
  6968.  
  6969.   Purpose:    Remove one or more subdirectories.
  6970.  
  6971.   Comments:   Before removing a subdirectory, you must delete all the
  6972.               files and subdirectories (and their files) in that
  6973.               directory (including any hidden or read-only files).
  6974.  
  6975.               You can use the MS-DOS wildcard characters (* and ?) in
  6976.               the directory names.
  6977.  
  6978.               You cannot remove the root directory (\), the current
  6979.               directory (.), or the parent directory (..).
  6980.  
  6981.               See also MD.
  6982.  
  6983.   Example:    Remove the subdirectory MEMOS from the subdirectory WP:
  6984.  
  6985.                    c:\> rmdir \wp\memos
  6986.  
  6987.  
  6988.  
  6989.  
  6990.  
  6991.  
  6992.  
  6993.  
  6994.  
  6995.  
  6996.  
  6997.  
  6998.  
  6999.  
  7000.  
  7001.  
  7002.  
  7003.  
  7004.  
  7005.  
  7006.  
  7007.  
  7008.  
  7009.  
  7010.  
  7011.  
  7012.  
  7013.  
  7014.  
  7015.  
  7016.  
  7017.  
  7018.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       109 
  7019.  
  7020.  
  7021.   REM
  7022.  
  7023.   Syntax:     REM [comment]
  7024.  
  7025.   Purpose:    Put a comment in a batch file.
  7026.  
  7027.   Comments:   If ECHO is ON, or the variable VERBOSE (see the SETDOS
  7028.               command) is set, 4DOS will echo the comment.  Otherwise,
  7029.               4DOS will ignore it.  If you don't want to echo the line,
  7030.               preface REM with the @ character.
  7031.  
  7032.               Enter your comment following the REM, separated by a
  7033.               space or tab.  Comments can be up to 255 characters.  4DOS
  7034.               will ignore everything following a REM, including quote
  7035.               characters, the redirection symbols (| > <), the command
  7036.               separator character, aliases, and environment variables.
  7037.  
  7038.               Batch file comments are useful for documenting the
  7039.               purpose for a batch file and the procedures used.
  7040.  
  7041.   Example:    Enter comments in a batch file:
  7042.  
  7043.                    rem This batch file provides a
  7044.                    rem menu-based system for accessing
  7045.                    rem the word processing utilities.
  7046.                    rem Clear the screen and get selection
  7047.                    cls
  7048.  
  7049.  
  7050.  
  7051.  
  7052.  
  7053.  
  7054.  
  7055.  
  7056.  
  7057.  
  7058.  
  7059.  
  7060.  
  7061.  
  7062.  
  7063.  
  7064.  
  7065.  
  7066.  
  7067.  
  7068.  
  7069.  
  7070.  
  7071.  
  7072.  
  7073.  
  7074.  
  7075.  
  7076.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       110 
  7077.  
  7078.  
  7079.   REN / RENAME
  7080.  
  7081.   Syntax:     REN [/PQ] [d:][path]filename... [d:][path]filename
  7082.                     or
  7083.               RENAME [/PQ] [d:][path]filename... [d:][path]filename
  7084.  
  7085.   Purpose:    Rename files or subdirectories.
  7086.  
  7087.   Comments:   The last filename is the new name; preceding names are
  7088.               the files or directories to be renamed.  You can use the
  7089.               wildcard characters (* and ?) in the filenames.  The new
  7090.               filename must not already exist.  You cannot rename a
  7091.               subdirectory to a new path!
  7092.  
  7093.               If the /P(rompt) option is specified, 4DOS will prompt
  7094.               you to enter Y or N to confirm each rename.
  7095.  
  7096.               The /Q(uiet) option turns off the display of the files
  7097.               renamed.
  7098.  
  7099.               RENAME in COMMAND.COM only allows a path to be
  7100.               specified with the first file name; the path for the
  7101.               target is always assumed to be the same as the source.
  7102.               4DOS allows you to optionally select the target path,
  7103.               renaming the source file to a new directory on the same
  7104.               disk drive.  If you don't specify a path for the target,
  7105.               4DOS will assume a "COMMAND.COM compatible" RENAME, and
  7106.               will rename the source file to the new name without moving
  7107.               it to another directory.
  7108.  
  7109.               If you want to rename to a different drive, use MOVE.
  7110.  
  7111.   Example:    Rename the file MEMO.TXT to OFFICE.TXT:
  7112.  
  7113.                    c:\> rename memo.txt office.txt
  7114.  
  7115.               Rename the files MEMO.TXT and MEMO2.TXT to another
  7116.               directory:
  7117.  
  7118.                    c:\> rename memo.txt memo2.txt c:\wp\memos
  7119.  
  7120.               Rename the directory \WORDPROC to \WP:
  7121.  
  7122.                    c:\> rename \wordproc \wp
  7123.  
  7124.  
  7125.  
  7126.  
  7127.  
  7128.  
  7129.  
  7130.  
  7131.  
  7132.  
  7133.  
  7134.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       111 
  7135.  
  7136.  
  7137.   RETURN
  7138.  
  7139.   Syntax:     RETURN
  7140.  
  7141.   Purpose:    Return from a GOSUB (subroutine) call in a batch file.
  7142.  
  7143.   Comments:   The RETURN command returns from a GOSUB call to the
  7144.               command following the original GOSUB.
  7145.  
  7146.               See also GOSUB.
  7147.  
  7148.   Example:    The following batch file fragment calls a subroutine
  7149.               which displays the current directory:
  7150.  
  7151.                    echo Calling a subroutine
  7152.                    gosub subr1
  7153.                    echo Returned from the subroutine
  7154.                    quit
  7155.                    :subr1
  7156.                    dir /hw
  7157.                    return
  7158.  
  7159.  
  7160.  
  7161.  
  7162.  
  7163.  
  7164.  
  7165.  
  7166.  
  7167.  
  7168.  
  7169.  
  7170.  
  7171.  
  7172.  
  7173.  
  7174.  
  7175.  
  7176.  
  7177.  
  7178.  
  7179.  
  7180.  
  7181.  
  7182.  
  7183.  
  7184.  
  7185.  
  7186.  
  7187.  
  7188.  
  7189.  
  7190.  
  7191.  
  7192.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       112 
  7193.  
  7194.  
  7195.   SCREEN
  7196.  
  7197.   Syntax:     SCREEN row column [message]
  7198.  
  7199.   Purpose:    Position the cursor on the screen, and optionally
  7200.               display a message.
  7201.  
  7202.   Comments:   The row and column are zero-based, so on a standard 25
  7203.               line by 80 column display, valid rows are 0 - 24 and valid
  7204.               columns are 0 - 79.
  7205.  
  7206.               SCREEN allows you to create attractive batch file
  7207.               screen displays.
  7208.  
  7209.               SCREEN does not change the screen colors.  If you have
  7210.               ANSI.SYS installed and have set colors with CLS or COLOR,
  7211.               those colors will be used for the display.  To display
  7212.               text in specific colors, use SCRPUT.
  7213.  
  7214.               SCREEN checks for a valid row and column, and displays
  7215.               an error message if either value is out of range.
  7216.  
  7217.               See also ECHO, SCRPUT and TEXT.
  7218.  
  7219.   Example:    The following batch file fragment displays a menu:
  7220.  
  7221.                    @echo off ^ cls
  7222.                    screen 3 10  Select a number from 1 to 4:
  7223.                    screen 6 20  1 - Word Processing
  7224.                    screen 7 20  2 - Spreadsheet
  7225.                    screen 8 20  3 - Telecommunications
  7226.                    screen 9 20  4 - Quit
  7227.  
  7228.  
  7229.  
  7230.  
  7231.  
  7232.  
  7233.  
  7234.  
  7235.  
  7236.  
  7237.  
  7238.  
  7239.  
  7240.  
  7241.  
  7242.  
  7243.  
  7244.  
  7245.  
  7246.  
  7247.  
  7248.  
  7249.  
  7250.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       113 
  7251.  
  7252.  
  7253.   SCRPUT
  7254.  
  7255.   Syntax:     SCRPUT row column [bright] [blink] fg ON bg text
  7256.  
  7257.   Purpose:    Display text in color.
  7258.  
  7259.   Comments:   The row and column are zero-based, so on a standard 25
  7260.               line by 80 column display, valid rows are 0 - 24 and valid
  7261.               columns are 0 - 79.
  7262.  
  7263.               SCRPUT works like SCREEN, but allows you to specify the
  7264.               display colors, and writes directly to the screen.
  7265.  
  7266.               The parameters are:
  7267.  
  7268.                    row     Start row
  7269.                    col     Start column
  7270.                    fg      Foreground character color
  7271.                    bg      Background character color
  7272.  
  7273.               Only the first three characters of the color name and
  7274.               attributes ("bright" and "blink") are required.  The
  7275.               available colors are:
  7276.  
  7277.                         Black     Blue      Green     Red
  7278.                         Magenta   Cyan      Yellow    White
  7279.  
  7280.               See also CLS, ECHO, SCREEN and TEXT.
  7281.  
  7282.   Example:    The following batch file fragment displays a menu in
  7283.               color (all commands should be entered on one line):
  7284.  
  7285.                    @echo off ^ cls white on blue
  7286.                    scrput 3 10 bri white on blue Select a number from 1
  7287.                      to 4:
  7288.                    scrput 6 20 bri red on blue 1 - Word Processing
  7289.                    scrput 7 20 bri yellow on blue 2 - Spreadsheet
  7290.                    scrput 8 20 bri green on blue 3 - Telecommunications
  7291.                    scrput 9 20 bri magenta on blue 4 - Quit
  7292.  
  7293.  
  7294.  
  7295.  
  7296.  
  7297.  
  7298.  
  7299.  
  7300.  
  7301.  
  7302.  
  7303.  
  7304.  
  7305.  
  7306.  
  7307.  
  7308.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       114 
  7309.  
  7310.  
  7311.   SELECT
  7312.  
  7313.   Syntax:     SELECT [/Oeirtuz] [command] ([d:][path]filename...)...
  7314.  
  7315.   Purpose:    Execute a command on the specified files.
  7316.  
  7317.   Comments:   SELECT allows you to select command line file arguments
  7318.               by marking the directory entries using a full-screen
  7319.               "point-and-shoot" display.   SELECT substitutes the
  7320.               selected files for the argument enclosed in parentheses,
  7321.               and executes the command for each marked file.  The
  7322.               command can be an alias, internal or external command, or
  7323.               batch file.  If you don't specify a command, the selected
  7324.               filename(s) will become the command (see example).
  7325.  
  7326.               The command can be a 4DOS internal command or alias, an
  7327.               external command, or a batch file.
  7328.  
  7329.               If you join filenames with a plus (+) sign, SELECT will
  7330.               display the files together (an "include list").  Only the
  7331.               first file in an include list can have a pathname;
  7332.               subsequent filenames default to the same path.
  7333.  
  7334.               If the filenames are enclosed in square brackets
  7335.               instead of parentheses, SELECT will substitute all of the
  7336.               selected filenames on one command line.  If there are too
  7337.               many filenames to fit on the line, SELECT will display an
  7338.               error message and exit.  All internal 4DOS commands
  7339.               support 255 character command lines, but  MS-DOS only
  7340.               supports 127 character command lines for external
  7341.               programs.  SELECT displays the approximate command line
  7342.               length in the upper left corner; it is your responsibility
  7343.               to ensure SELECT doesn't exceed the 127 character limit
  7344.               for external commands.
  7345.  
  7346.               SELECT uses the up arrow, down arrow, PgUp, and PgDn
  7347.               keys to scroll through the files matching the argument(s).
  7348.               Use the + key or the spacebar to select a file (or
  7349.               unselect a marked file), and the - key to unselect a file.
  7350.               The * key will select all of the files (excluding
  7351.               subdirectories).  After marking the files, press ENTER to
  7352.               execute the command.  You can select a single file by
  7353.               moving the scroll bar to the filename and pressing ENTER
  7354.               when no other files have been marked.
  7355.  
  7356.  
  7357.  
  7358.  
  7359.  
  7360.  
  7361.  
  7362.  
  7363.  
  7364.  
  7365.  
  7366.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       115 
  7367.  
  7368.  
  7369.               The /O option determines the sort order for the
  7370.               directory display (the default sort is by filename):
  7371.  
  7372.                    e  Sort by extension
  7373.                    i  Sort by description (see DESCRIBE)
  7374.                    r  Reverse the sort order
  7375.                    t  Sort by time (oldest first)
  7376.                    u  Unsorted
  7377.                    z  Sort by size
  7378.  
  7379.               If you want to use filename completion (see Command
  7380.               Line Editing in Using 4DOS) to enter the filenames inside
  7381.               the parentheses, type a space after the "(".  Otherwise
  7382.               the command line editor will treat "(" as the first
  7383.               character of the filename.
  7384.  
  7385.               To cancel the SELECT command, type an Escape, ^C, or
  7386.               ^BREAK.
  7387.  
  7388.   Example:    Select from the files in the current directory with the
  7389.               extension .COM, and then from the files with the extension
  7390.               .EXE to copy to the root directory on drive A:
  7391.  
  7392.                    c:\> select copy (*.com *.exe) a:\
  7393.  
  7394.               Define an alias that selects from the executable files
  7395.               in the directory C:\UTIL, and then executes them in the
  7396.               order marked (the alias should be entered on one line):
  7397.  
  7398.                    c:\> alias utils select
  7399.                            (c:\util\*.com+*.exe+*.btm+*.bat)
  7400.                    c:\> utils
  7401.  
  7402.               Select from all the files in the current directory to
  7403.               move to the root directory on A (since the argument list
  7404.               is enclosed in square brackets, this will be done by a
  7405.               single command):
  7406.  
  7407.                    c:\> select move [*.*] a:\
  7408.  
  7409.  
  7410.  
  7411.  
  7412.  
  7413.  
  7414.  
  7415.  
  7416.  
  7417.  
  7418.  
  7419.  
  7420.  
  7421.  
  7422.  
  7423.  
  7424.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       116 
  7425.  
  7426.  
  7427.   SET
  7428.  
  7429.   Syntax:     SET [/P] [/R filename...] [variable[=][value]]
  7430.  
  7431.   Purpose:    Display, create, modify, or delete environment
  7432.               variables.
  7433.  
  7434.   Comments:   Entering SET with no variable or value displays the
  7435.               environment.  If you don't enter a value, SET will remove
  7436.               the variable from the environment.  Otherwise, the
  7437.               variable and the value are placed in the environment.  If
  7438.               the variable already exists, its old contents are replaced
  7439.               by the new value.  4DOS limits the variable name to a
  7440.               maximum of 80 characters, and the value to a maximum of
  7441.               255 characters.  The variable names are shifted to upper
  7442.               case before being stored in the environment; the value is
  7443.               stored exactly as entered.
  7444.  
  7445.               The /P option will pause after displaying a page of
  7446.               environment entries.  Press ^C to quit, or any other key
  7447.               to display the next page.
  7448.  
  7449.               The /R(ead) option allows you to load environment
  7450.               variables from a file.  This is much faster than loading
  7451.               variables from a batch file.  The file is in the same
  7452.               format as the SET display, so SET /R can accept as input a
  7453.               file generated by redirecting SET output.  You can load
  7454.               multiple files with one SET /R command by placing the
  7455.               names one after another on the command line, separated by
  7456.               spaces.
  7457.  
  7458.               For example, the following commands will save the
  7459.               environment variables to a file, and then reload them from
  7460.               that file:
  7461.  
  7462.                    set > varlist
  7463.                    set /r varlist
  7464.  
  7465.               You can add comments to a variable file by starting the
  7466.               comment line with a colon (:).
  7467.  
  7468.               SET only affects the environment of the current command
  7469.               processor.  If you EXIT to a parent command processor, the
  7470.               original environment will be unchanged.  The size of the
  7471.               environment is specified by the /E parameter at startup.
  7472.               The default size is 512 characters, the minimum size 256
  7473.               characters, and the maximum size 32000 characters.
  7474.  
  7475.  
  7476.  
  7477.  
  7478.  
  7479.  
  7480.  
  7481.  
  7482.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       117 
  7483.  
  7484.  
  7485.               You can remove multiple environment variables with the
  7486.               UNSET command.
  7487.  
  7488.               You can edit environment variables and aliases with the
  7489.               ESET command.  To enter aliases, use ALIAS.
  7490.  
  7491.               See also UNSET and ESET.
  7492.  
  7493.   Example:    Display the current environment:
  7494.  
  7495.                    c:\> set
  7496.                    COMSPEC=C:\4DOS.COM
  7497.                    PATH=C:\;C:\DOS;C:\UTIL
  7498.  
  7499.               Add a variable to the environment:
  7500.  
  7501.                    c:\> set mine=c:\finance\myfiles
  7502.                    c:\> set
  7503.                    COMSPEC=C:\4DOS.COM
  7504.                    PATH=C:\;C:\DOS;C:\UTIL
  7505.                    MINE=c:\finance\myfiles
  7506.  
  7507.               Remove a variable from the environment:
  7508.  
  7509.                    c:\> set mine
  7510.                    c:\> set
  7511.                    COMSPEC=C:\4DOS.COM
  7512.                    PATH=C:\;C:\DOS;C:\UTIL
  7513.  
  7514.  
  7515.  
  7516.  
  7517.  
  7518.  
  7519.  
  7520.  
  7521.  
  7522.  
  7523.  
  7524.  
  7525.  
  7526.  
  7527.  
  7528.  
  7529.  
  7530.  
  7531.  
  7532.  
  7533.  
  7534.  
  7535.  
  7536.  
  7537.  
  7538.  
  7539.  
  7540.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       118 
  7541.  
  7542.  
  7543.   SETDOS
  7544.  
  7545.   Syntax:     SETDOS [/A? /C? /E? /H? /I+|-command /L? /M? /N? /R?
  7546.                /S?:? /U? /V?]
  7547.  
  7548.   Purpose:    Display or set 4DOS configuration variables.
  7549.  
  7550.   Comments:   SETDOS allows you to customize 4DOS to your personal
  7551.               tastes.  You would normally define the SETDOS variables in
  7552.               your AUTOEXEC.BAT or 4START file.  The SETDOS options are:
  7553.  
  7554.                  A  The ANSI variable determines whether 4DOS will
  7555.                       attempt to use an ANSI escape sequence for CLS.
  7556.                       4DOS normally determines this itself, but if you
  7557.                       are using a non-standard ANSI driver or your
  7558.                       loading sequence is unusual, you may need to
  7559.                       explicitly inform 4DOS.  /A0 allows 4DOS to
  7560.                       determine whether an ANSI driver is installed; /A1
  7561.                       forces 4DOS to assume an ANSI driver is installed.
  7562.  
  7563.                  C  The COMPOUND variable is the character used for
  7564.                       separating multiple commands on the same line.
  7565.                       The default character is the caret (^).  You
  7566.                       cannot use any of the redirection characters (| >
  7567.                       <), or any of the whitespace characters (=,;) as
  7568.                       the command separator.
  7569.  
  7570.                  E  The ESCAPE variable is the character used to suppress
  7571.                       the normal meaning of the following character.  Any
  7572.                       character following the escape character will be
  7573.                       passed unmodified to the command line.  The default
  7574.                       escape character is ^X (Ctrl-X, displayed as an up
  7575.                       arrow).  You cannot use any of the redirection
  7576.                       characters (| > <) or the whitespace characters
  7577.                       (=,;) as the escape character.
  7578.  
  7579.                  H  The HISTORY variable determines the minimum command
  7580.                       size to save.  Any command line whose length is
  7581.                       less than this value will not be saved to the
  7582.                       history list.  Setting /H to 256 will disable
  7583.                       history saves; setting it to 0 will save
  7584.                       everything.  The default value is 0 (save all
  7585.                       command lines).
  7586.  
  7587.  
  7588.  
  7589.  
  7590.  
  7591.  
  7592.  
  7593.  
  7594.  
  7595.  
  7596.  
  7597.  
  7598.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       119 
  7599.  
  7600.  
  7601.                  I  The INTERNAL variable allows you to disable or
  7602.                       enable internal 4DOS commands.  To disable a
  7603.                       command, precede the command name with a minus (-).
  7604.                       To reenable a command, precede it with a plus (+).
  7605.  
  7606.                  L  The LINE variable controls how 4DOS gets its input
  7607.                       from the command line.  The default value is 0
  7608.                       (character input).  If you set /L to 1, 4DOS uses
  7609.                       the INT 21 0Ah "Get Line" call (like COMMAND.COM).
  7610.                       Note that this will disable command line editing,
  7611.                       history recall, and filename expansion.  If you
  7612.                       have an program that requires line input, you can
  7613.                       define an alias or batch file:
  7614.  
  7615.                            setdos /L1 ^ program %& ^ setdos /L0
  7616.  
  7617.                       See the file COMPAT.DOC for information on
  7618.                       programs which require this option.
  7619.  
  7620.                  M  The MODE variable controls the line editing mode.
  7621.                       4DOS defaults to overstrike mode (/M0).  If MODE
  7622.                       is set to 1, the default is insert mode.
  7623.  
  7624.                  N  The NOCLOBBER variable controls output redirection.
  7625.                       If NOCLOBBER is set to 1, then existing files may
  7626.                       not be destroyed by output redirection, and when
  7627.                       appending with >>, the output file must exist.
  7628.                       NOCLOBBER can be overridden with the ! character
  7629.                       (see the section on redirection in Using 4DOS).
  7630.                       The default value is 0.
  7631.  
  7632.                  R  The ROWS variable sets the number of screen rows
  7633.                       used by the video display.  Normally 4DOS detects
  7634.                       the screen size, but if you have a non-standard
  7635.                       display you may need to set it explicitly.  The
  7636.                       ROWS variable does not affect screen scrolling
  7637.                       (that is controlled by your video BIOS or
  7638.                       ANSI.SYS); it is used only for LIST, SELECT, the
  7639.                       paged output options (i.e., TYPE /P), and error
  7640.                       checking in the screen output commands.
  7641.  
  7642.  
  7643.  
  7644.  
  7645.  
  7646.  
  7647.  
  7648.  
  7649.  
  7650.  
  7651.  
  7652.  
  7653.  
  7654.  
  7655.  
  7656.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       120 
  7657.  
  7658.  
  7659.                  S  The SHAPE variable sets the 4DOS cursor shape.  The
  7660.                       format is /Ss:e where s is the starting scan line
  7661.                       and e the ending.  The default values are the last
  7662.                       two lines of the cursor cell.  The default editing
  7663.                       mode (see /M above) uses the default cursor shape;
  7664.                       the other mode sets the starting scan line to 0
  7665.                       and displays a block cursor.
  7666.  
  7667.                  U  The UPPER variable controls the way filenames are
  7668.                       displayed for the internal commands (COPY, DIR,
  7669.                       etc.).  If UPPER is set to 1, filenames will be
  7670.                       displayed in upper case (like COMMAND.COM).  UPPER
  7671.                       defaults to /U0 (filenames will be displayed in
  7672.                       lower case).
  7673.  
  7674.                  V  The VERBOSE variable controls command echoing in
  7675.                       batch files.  If VERBOSE is set to 0, batch file
  7676.                       commands will NOT be echoed unless ECHO is set ON.
  7677.                       VERBOSE defaults to 1 (that is, batch file
  7678.                       commands WILL be echoed).
  7679.  
  7680.   Example:    Change the COMPOUND character to a ~ (tilde):
  7681.  
  7682.                    c:\> setdos /c~
  7683.  
  7684.               Change MODE to insert, VERBOSE to off, and set
  7685.               NOCLOBBER on:
  7686.  
  7687.                    c:\> setdos /m1 /v0 /n1
  7688.  
  7689.               Disable the internal LIST command to force 4DOS to use
  7690.               an external command:
  7691.  
  7692.                    c:\> setdos /i-list
  7693.  
  7694.  
  7695.  
  7696.  
  7697.  
  7698.  
  7699.  
  7700.  
  7701.  
  7702.  
  7703.  
  7704.  
  7705.  
  7706.  
  7707.  
  7708.  
  7709.  
  7710.  
  7711.  
  7712.  
  7713.  
  7714.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       121 
  7715.  
  7716.  
  7717.   SETLOCAL
  7718.  
  7719.   Syntax:     SETLOCAL
  7720.  
  7721.   Purpose:    Save a copy of the current disk drive, directory,
  7722.               environment variables, and aliases.
  7723.  
  7724.   Comments:   SETLOCAL is used in batch files to save the disk drive,
  7725.               directory, environment variables and aliases to a reserved
  7726.               block of memory.  You can then change their values, and
  7727.               later restore the original values with ENDLOCAL.  You
  7728.               cannot use SETLOCAL  in an alias.
  7729.  
  7730.               SETLOCAL and ENDLOCAL are not nestable within the same
  7731.               batch file.  However, you can have multiple SETLOCAL /
  7732.               ENDLOCAL pairs within a batch file, and nested batch files
  7733.               can each have their own SETLOCAL / ENDLOCAL.  4DOS will
  7734.               automatically perform an ENDLOCAL at the end of a batch
  7735.               file.
  7736.  
  7737.               Note that if you invoke a batch file from another
  7738.               without using CALL, the first batch file is implicitly
  7739.               terminated, and an automatic ENDLOCAL performed.  The
  7740.               second batch file will inherit the drive, directory,
  7741.               environment variables, and aliases as they were prior to
  7742.               the SETLOCAL.
  7743.  
  7744.               Do not load TSRs (memory-resident programs) from a
  7745.               batch file while a SETLOCAL is in effect.  If you do, when
  7746.               ENDLOCAL is executed and the memory used by SETLOCAL is
  7747.               released, a "hole" will be left in memory below the TSR.
  7748.               This is not harmful, but wastes memory.
  7749.  
  7750.                  See also ENDLOCAL.
  7751.  
  7752.   Example:    This batch file fragment saves the disk drive,
  7753.               directory, environment variables and aliases, changes the
  7754.               disk and directory, modifies some variables, runs a
  7755.               program, and then restores the original values:
  7756.  
  7757.                    setlocal
  7758.                    cdd d:\test ^ set path=c:\;c:\dos;c:\util
  7759.                    set lib=d:\lib
  7760.                    rem run some program here
  7761.                    endlocal
  7762.  
  7763.  
  7764.  
  7765.  
  7766.  
  7767.  
  7768.  
  7769.  
  7770.  
  7771.  
  7772.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       122 
  7773.  
  7774.  
  7775.   SHIFT
  7776.  
  7777.   Syntax:     SHIFT [n]
  7778.  
  7779.   Purpose:    Allow the use of more than 10 variables in a batch
  7780.               file.
  7781.  
  7782.   Comment:    SHIFT is provided for compatibility with COMMAND.COM.
  7783.               COMMAND.COM supports only 10 parameters (%0 through %9);
  7784.               4DOS supports 128 parameters (%0 to %127), so you may not
  7785.               need to use SHIFT for batch files running exclusively
  7786.               under 4DOS.
  7787.  
  7788.               SHIFT moves each of the batch file parameters n
  7789.               positions (i.e., %1 becomes %0, %2 becomes %1, etc.).  The
  7790.               default value for n  is 1.  You can also reverse a SHIFT,
  7791.               by giving a negative value for n (i.e., if n  is -1, the
  7792.               former value for %0 is restored, %0 becomes %1, %1 becomes
  7793.               %2, etc.).
  7794.  
  7795.               SHIFT also affects the %n& (command line tail) and %#
  7796.               (number of command arguments) batch variables.
  7797.  
  7798.   Example:    Create a batch file called TEST.BAT:
  7799.  
  7800.                    echo %1 %2 %3 %4
  7801.                    shift
  7802.                    echo %1 %2 %3 %4
  7803.                    shift 2
  7804.                    echo %1 %2 %3 %4
  7805.                    shift -1
  7806.                    echo %1 %2 %3 %4
  7807.  
  7808.               Executing TEST.BAT produces the following results:
  7809.  
  7810.                    c:\> test zero one two three four five six
  7811.                    zero one two three
  7812.                    one two three four
  7813.                    three four five six
  7814.                    two three four five
  7815.  
  7816.  
  7817.  
  7818.  
  7819.  
  7820.  
  7821.  
  7822.  
  7823.  
  7824.  
  7825.  
  7826.  
  7827.  
  7828.  
  7829.  
  7830.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       123 
  7831.  
  7832.  
  7833.   SWAPPING
  7834.  
  7835.   Syntax:     SWAPPING [on | off]
  7836.  
  7837.   Purpose:    Display, enable, or disable the 4DOS swapping state.
  7838.  
  7839.   Comments:   SWAPPING will temporarily disable or enable the
  7840.               swapping of the 4DOS transient portion to EMS, XMS, or
  7841.               disk (see Installation).  This is particularly useful when
  7842.               running batch files while swapping to disk.  If swapping
  7843.               is enabled, 4DOS saves its transient portion before
  7844.               executing any external command.  When the command
  7845.               finishes, 4DOS performs a checksum on the transient
  7846.               portion (when swapping to disk), and restores it if
  7847.               necessary.  (When swapping to EMS or XMS, 4DOS always
  7848.               restores the transient portion.)  When you are running
  7849.               several small programs from a batch file and using disk
  7850.               swapping, the swapping can sometimes cause a noticeable
  7851.               delay.  Turning SWAPPING OFF can speed up such operations.
  7852.  
  7853.               If SWAPPING is OFF, available MS-DOS memory will be
  7854.               reduced by the size of the 4DOS transient portion (about
  7855.               70K).  Setting SWAPPING OFF does not close the disk swap
  7856.               file, or release any reserved EMS or XMS memory.
  7857.  
  7858.               Setting SWAPPING OFF can be useful in speeding up your
  7859.               AUTOEXEC.BAT file.
  7860.  
  7861.   Example:    Check the current SWAPPING status:
  7862.  
  7863.                    c:\> swapping
  7864.                    SWAPPING is ON
  7865.  
  7866.               The following batch file fragment disables swapping,
  7867.               runs several programs, and then reenables swapping:
  7868.  
  7869.                    swapping off
  7870.                    c:\util\mouse
  7871.                    c:\video\ansi.com
  7872.                    cls bright white on blue
  7873.                    c:\bin\cache.com
  7874.                    swapping on
  7875.  
  7876.  
  7877.  
  7878.  
  7879.  
  7880.  
  7881.  
  7882.  
  7883.  
  7884.  
  7885.  
  7886.  
  7887.  
  7888.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       124 
  7889.  
  7890.  
  7891.   TEE
  7892.  
  7893.   Syntax:     TEE [/A] [d:][path]filename...
  7894.  
  7895.   Purpose:    Copy standard input to standard output, and save a copy
  7896.               in the specified file(s).
  7897.  
  7898.   Comments:   The /A option causes the output to be appended to the
  7899.               file(s) rather than overwriting it.
  7900.  
  7901.               If you are typing at the keyboard, you need to enter a
  7902.               ^Z to terminate the input.
  7903.  
  7904.               TEE is often used to save the intermediate output of a
  7905.               pipe.
  7906.  
  7907.               See also Y.
  7908.  
  7909.   Example:    Search the file DOC for any lines containing the string
  7910.               "4DOS", make a copy of the matching lines in 4.DAT, sort
  7911.               the lines, and write them to the output file 4DOS.DAT:
  7912.  
  7913.                    c:\> find "4DOS" doc | tee 4.dat | sort > 4dos.dat
  7914.  
  7915.  
  7916.  
  7917.  
  7918.  
  7919.  
  7920.  
  7921.  
  7922.  
  7923.  
  7924.  
  7925.  
  7926.  
  7927.  
  7928.  
  7929.  
  7930.  
  7931.  
  7932.  
  7933.  
  7934.  
  7935.  
  7936.  
  7937.  
  7938.  
  7939.  
  7940.  
  7941.  
  7942.  
  7943.  
  7944.  
  7945.  
  7946.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       125 
  7947.  
  7948.  
  7949.   TEXT
  7950.  
  7951.   Syntax:     TEXT
  7952.                 .
  7953.                 .
  7954.                 .
  7955.               ENDTEXT
  7956.  
  7957.   Purpose:    Display a block of text in a batch file.
  7958.  
  7959.   Comments:   The TEXT command is useful for displaying menus or
  7960.               multiple line messages.  TEXT will display subsequent
  7961.               lines in the batch file until terminated by ENDTEXT.  Both
  7962.               TEXT and ENDTEXT must be entered as the only command on
  7963.               that line.
  7964.  
  7965.               If you have ANSI.SYS loaded, you can change screen
  7966.               colors by inserting ANSI escape sequences into the text
  7967.               block.
  7968.  
  7969.               See also ECHO, SCREEN and SCRPUT.
  7970.  
  7971.   Example:    The following batch file fragment displays a simple
  7972.               menu:
  7973.  
  7974.                    @echo off ^ cls ^ screen 2 0
  7975.                    text
  7976.                    Enter one of the following:
  7977.  
  7978.                       1 - Spreadsheet
  7979.                       2 - Word Processing
  7980.                       3 - DOS Utilities
  7981.  
  7982.                    Enter your selection :
  7983.                    endtext
  7984.  
  7985.  
  7986.  
  7987.  
  7988.  
  7989.  
  7990.  
  7991.  
  7992.  
  7993.  
  7994.  
  7995.  
  7996.  
  7997.  
  7998.  
  7999.  
  8000.  
  8001.  
  8002.  
  8003.  
  8004.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       126 
  8005.  
  8006.  
  8007.   TIME
  8008.  
  8009.   Syntax:     TIME [hh[:mm[:ss]][am | pm]
  8010.  
  8011.   Purpose:    Display or set the current system time.
  8012.  
  8013.   Comments:   If you don't enter any parameters, TIME will display
  8014.               the current system time and prompt you for a new time.
  8015.               Press ENTER if you don't wish to change the time,
  8016.               otherwise enter the new time.
  8017.  
  8018.               The parameters for the TIME command are:
  8019.  
  8020.                    hh (hour) = 0 - 23
  8021.                    mm (minute) = 0 - 59
  8022.                    ss (second) = 0 - 59
  8023.  
  8024.               TIME defaults to 24-hour format, but you can optionally
  8025.               enter the time in 12-hour format by appending an "am" or
  8026.               "pm".
  8027.  
  8028.               Whenever you create or modify a file, the system time
  8029.               is recorded in  the directory entry.
  8030.  
  8031.   Example:    Enter the time (9:30 am):
  8032.  
  8033.                    c:\> time 9:30
  8034.  
  8035.               To be prompted for the time:
  8036.  
  8037.                    c:\> time
  8038.                    Mon  Dec 25, 1989  9:30:10
  8039.                    New time (hh:mm:ss):
  8040.  
  8041.  
  8042.  
  8043.  
  8044.  
  8045.  
  8046.  
  8047.  
  8048.  
  8049.  
  8050.  
  8051.  
  8052.  
  8053.  
  8054.  
  8055.  
  8056.  
  8057.  
  8058.  
  8059.  
  8060.  
  8061.  
  8062.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       127 
  8063.  
  8064.  
  8065.   TIMER
  8066.  
  8067.   Syntax:     TIMER [/S]
  8068.  
  8069.   Purpose:    System stopwatch.
  8070.  
  8071.   Comments:   The TIMER command turns the system stopwatch on and
  8072.               off.  The first time you run TIMER, the stopwatch starts.
  8073.               When you run TIMER again, the stopwatch stops and the
  8074.               elapsed time is displayed.
  8075.  
  8076.               The /S option allows you to display a split time
  8077.               without stopping the timer.
  8078.  
  8079.               TIMER is particularly useful for timing events in batch
  8080.               files.
  8081.  
  8082.               The smallest interval TIMER can measure is .06 seconds;
  8083.               the largest interval is 23:59:59.99.
  8084.  
  8085.   Example:    Start the timer:
  8086.  
  8087.                    c:\> timer
  8088.                    Timer on:  12:21:46
  8089.  
  8090.               Display the current time, leaving the timer running:
  8091.  
  8092.                    c:\> timer /s
  8093.                    Elapsed time:  0:00:08.90
  8094.  
  8095.               Stop the timer:
  8096.  
  8097.                    c:\> timer
  8098.                    Timer off:  12:21:58    Elapsed time: 0:00:12.06
  8099.  
  8100.  
  8101.  
  8102.  
  8103.  
  8104.  
  8105.  
  8106.  
  8107.  
  8108.  
  8109.  
  8110.  
  8111.  
  8112.  
  8113.  
  8114.  
  8115.  
  8116.  
  8117.  
  8118.  
  8119.  
  8120.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       128 
  8121.  
  8122.  
  8123.   TYPE
  8124.  
  8125.   Syntax:     TYPE [/LP] [d:][pathname]filename...
  8126.  
  8127.   Purpose:    Display the contents of the specified file(s).
  8128.  
  8129.   Comments:   The TYPE command displays a file.  Press ^S to suspend
  8130.               the display, and any character key to continue the
  8131.               display.
  8132.  
  8133.               The /L option prints line numbers preceding each line
  8134.               of text.
  8135.  
  8136.               The /P option will pause after each page.  Press ^C to
  8137.               quit, or any other key to display the next page.
  8138.  
  8139.               TYPE is normally only useful for displaying ASCII text
  8140.               files; executable files (.COM and .EXE) and many data
  8141.               files may be unreadable due to the presence of non-
  8142.               alphanumeric characters.
  8143.  
  8144.               You will probably find LIST to be more useful for
  8145.               displaying files.
  8146.  
  8147.               See also LIST.
  8148.  
  8149.   Example:    Display the files MEMO1 and MEMO2, pausing at the end
  8150.               of each page:
  8151.  
  8152.                    c:\> type /p memo1 memo2
  8153.  
  8154.  
  8155.  
  8156.  
  8157.  
  8158.  
  8159.  
  8160.  
  8161.  
  8162.  
  8163.  
  8164.  
  8165.  
  8166.  
  8167.  
  8168.  
  8169.  
  8170.  
  8171.  
  8172.  
  8173.  
  8174.  
  8175.  
  8176.  
  8177.  
  8178.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       129 
  8179.  
  8180.  
  8181.   UNALIAS
  8182.  
  8183.   Syntax:     UNALIAS alias...
  8184.                 or
  8185.               UNALIAS *
  8186.  
  8187.   Purpose:    Remove aliases from the alias list.
  8188.  
  8189.   Comments:   UNALIAS also accepts the wildcard character * to delete
  8190.               all aliases.
  8191.  
  8192.               See also ALIAS and ESET.
  8193.  
  8194.   Example:    Remove the alias DDIR:
  8195.  
  8196.                    c:\> unalias ddir
  8197.  
  8198.               Remove the aliases DDIR and ZAP:
  8199.  
  8200.                    c:\> unalias ddir zap
  8201.  
  8202.               Remove all the aliases:
  8203.  
  8204.                    c:\> unalias *
  8205.  
  8206.  
  8207.  
  8208.  
  8209.  
  8210.  
  8211.  
  8212.  
  8213.  
  8214.  
  8215.  
  8216.  
  8217.  
  8218.  
  8219.  
  8220.  
  8221.  
  8222.  
  8223.  
  8224.  
  8225.  
  8226.  
  8227.  
  8228.  
  8229.  
  8230.  
  8231.  
  8232.  
  8233.  
  8234.  
  8235.  
  8236.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       130 
  8237.  
  8238.  
  8239.   UNSET
  8240.  
  8241.   Syntax:     UNSET name...
  8242.                 or
  8243.               UNSET *
  8244.  
  8245.   Purpose:    Remove variables from the environment.
  8246.  
  8247.   Comments:   UNSET also accepts the wildcard character * to delete
  8248.               all of the environment variables.  Use caution with UNSET
  8249.               *; many programs are dependent on environment variables,
  8250.               and 4DOS itself relies on PATH, COMSPEC, and 4DSHELL.
  8251.  
  8252.               See also SET and ESET.
  8253.  
  8254.   Example:    Remove the variable CMDLINE:
  8255.  
  8256.                    c:\> unset cmdline
  8257.  
  8258.               Remove the variables CMDLINE and PATH:
  8259.  
  8260.                    c:\> unset cmdline path
  8261.  
  8262.               Remove all the environment variables:
  8263.  
  8264.                    c:\> unset *
  8265.  
  8266.  
  8267.  
  8268.  
  8269.  
  8270.  
  8271.  
  8272.  
  8273.  
  8274.  
  8275.  
  8276.  
  8277.  
  8278.  
  8279.  
  8280.  
  8281.  
  8282.  
  8283.  
  8284.  
  8285.  
  8286.  
  8287.  
  8288.  
  8289.  
  8290.  
  8291.  
  8292.  
  8293.  
  8294.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       131 
  8295.  
  8296.  
  8297.   VER
  8298.  
  8299.   Syntax:     VER
  8300.  
  8301.   Purpose:    Display the current 4DOS and MS-DOS versions.
  8302.  
  8303.   Comments:   The 4DOS and MS-DOS versions consist of a one digit
  8304.               major version number, a period, and a one or two digit
  8305.               minor version number.
  8306.  
  8307.   Example:    Get the current version of 4DOS and MS-DOS:
  8308.  
  8309.                    c:\> ver
  8310.  
  8311.                    4DOS 3.03     DOS 3.31
  8312.  
  8313.  
  8314.  
  8315.  
  8316.  
  8317.  
  8318.  
  8319.  
  8320.  
  8321.  
  8322.  
  8323.  
  8324.  
  8325.  
  8326.  
  8327.  
  8328.  
  8329.  
  8330.  
  8331.  
  8332.  
  8333.  
  8334.  
  8335.  
  8336.  
  8337.  
  8338.  
  8339.  
  8340.  
  8341.  
  8342.  
  8343.  
  8344.  
  8345.  
  8346.  
  8347.  
  8348.  
  8349.  
  8350.  
  8351.  
  8352.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       132 
  8353.  
  8354.  
  8355.   VERIFY
  8356.  
  8357.   Syntax:     VERIFY [on | off]
  8358.  
  8359.   Purpose:    Display, enable, or disable disk write verification.
  8360.  
  8361.   Comments:   When VERIFY is ON, MS-DOS will verify that no error
  8362.               occurred during the disk write operation.  It does NOT
  8363.               compare the data actually written to the disk.  VERIFY
  8364.               will remain ON until you set it OFF.
  8365.  
  8366.               Entering VERIFY with no parameters will display the
  8367.               current VERIFY state.
  8368.  
  8369.               Verification will slow your disk write operations
  8370.               slightly.
  8371.  
  8372.               At system startup, VERIFY is OFF.
  8373.  
  8374.   Example:    Check the current verify status:
  8375.  
  8376.                    c:\> verify
  8377.                    VERIFY is OFF
  8378.  
  8379.               Enable disk write verification:
  8380.  
  8381.                    c:\> verify on
  8382.  
  8383.  
  8384.  
  8385.  
  8386.  
  8387.  
  8388.  
  8389.  
  8390.  
  8391.  
  8392.  
  8393.  
  8394.  
  8395.  
  8396.  
  8397.  
  8398.  
  8399.  
  8400.  
  8401.  
  8402.  
  8403.  
  8404.  
  8405.  
  8406.  
  8407.  
  8408.  
  8409.  
  8410.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       133 
  8411.  
  8412.  
  8413.   VOL
  8414.  
  8415.   Syntax:     VOL [d:]...
  8416.  
  8417.   Purpose:    Display the disk volume label(s).
  8418.  
  8419.   Comments:   If you don't enter a drive name, VOL displays the disk
  8420.               label for the current drive.
  8421.  
  8422.               If the disk doesn't have a volume name, VOL will report
  8423.               it as "unlabeled."
  8424.  
  8425.               Volume labels can be created, changed or deleted with
  8426.               the external MS-DOS LABEL command.
  8427.  
  8428.   Example:    Display the label for the default disk:
  8429.  
  8430.                    c:\> vol
  8431.                    Volume in drive C: is MYHARDDISK
  8432.  
  8433.               Display the disk labels for drives A and B:
  8434.  
  8435.                    c:\> vol a: b:
  8436.                    Volume in drive A: is unlabeled
  8437.                    Volume in drive B: is BACKUP_2
  8438.  
  8439.  
  8440.  
  8441.  
  8442.  
  8443.  
  8444.  
  8445.  
  8446.  
  8447.  
  8448.  
  8449.  
  8450.  
  8451.  
  8452.  
  8453.  
  8454.  
  8455.  
  8456.  
  8457.  
  8458.  
  8459.  
  8460.  
  8461.  
  8462.  
  8463.  
  8464.  
  8465.  
  8466.  
  8467.  
  8468.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       134 
  8469.  
  8470.  
  8471.   Y
  8472.  
  8473.   Syntax:     Y [d:][path]filename...
  8474.  
  8475.   Purpose:    Copy standard input to standard output, and then copy
  8476.               the specified file(s) to standard output.
  8477.  
  8478.   Comments:   Standard input from the console is terminated by a ^Z.
  8479.  
  8480.               See also TEE.
  8481.  
  8482.   Example:    Get text from standard input, append the files MEMO1
  8483.               and MEMO2 to it, and send the output to MEMOS:
  8484.  
  8485.                    c:\> y memo1 memo2 > memos
  8486.  
  8487.  
  8488.  
  8489.  
  8490.  
  8491.  
  8492.  
  8493.  
  8494.  
  8495.  
  8496.  
  8497.  
  8498.  
  8499.  
  8500.  
  8501.  
  8502.  
  8503.  
  8504.  
  8505.  
  8506.  
  8507.  
  8508.  
  8509.  
  8510.  
  8511.  
  8512.  
  8513.  
  8514.  
  8515.  
  8516.  
  8517.  
  8518.  
  8519.  
  8520.  
  8521.  
  8522.  
  8523.  
  8524.  
  8525.  
  8526.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       135 
  8527.  
  8528.  
  8529.   APPENDIX A - 4DOS and MS-DOS Error Messages
  8530.  
  8531.  
  8532.   4DOS swapping failed, loading in memory-resident mode
  8533.  
  8534.        None of the swapping options worked.  Check your swapping
  8535.        specification in SHELL or 4DSHELL, and/or free XMS or EMS memory
  8536.        or disk space.
  8537.  
  8538.   4DOS unrecoverable error XX
  8539.  
  8540.        An error occurred in the resident portion of 4DOS.  These errors
  8541.        will terminate secondary shells, and require a reboot if they
  8542.        occur during a primary shell.
  8543.  
  8544.                  BI   Bad server function code
  8545.                  DI   Same as Disk swap file corrupted
  8546.                  DR   Same as Swap file read error
  8547.                  DS   Same as Swap file seek error
  8548.                  ES   Same as EMS map save or restore failed
  8549.                  EI   Same as EMS mapping error
  8550.                  NS   No number for new shell
  8551.                  PT   Illegal process termination
  8552.                  TS   Terminated inactive shell
  8553.                  XI   Same as XMS move failed
  8554.  
  8555.   Access denied
  8556.  
  8557.        You tried to erase or write to a read-only protected file, to
  8558.        rename a file or directory to an existing name, or to remove a
  8559.        read-only directory or a directory with files or subdirectories
  8560.        still in it.
  8561.  
  8562.   Alias loop
  8563.  
  8564.        An alias refers back to itself (i.e., a = b = a), or aliases are
  8565.        nested more than 16 deep.  Correct your alias list.
  8566.  
  8567.   Attempt to exit from root shell
  8568.  
  8569.        Another program has destroyed a portion of 4DOS' memory, or you
  8570.        forgot a /P on your SHELL line in CONFIG.SYS.  Reboot the system
  8571.        and correct the error.
  8572.  
  8573.   Bad disk unit
  8574.  
  8575.        Generally caused by a disk drive hardware failure.
  8576.  
  8577.  
  8578.  
  8579.  
  8580.  
  8581.  
  8582.  
  8583.  
  8584.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       136 
  8585.  
  8586.  
  8587.   Bad environment
  8588.  
  8589.        The MS-DOS environment has a bad structure.  Reboot the system.
  8590.  
  8591.   Batch file missing
  8592.  
  8593.        4DOS can't find the batch (.BAT) file it was running.  It was
  8594.        either deleted, renamed, moved, or the disk was changed.
  8595.  
  8596.   Can't copy file to itself
  8597.  
  8598.        4DOS will not permit you to COPY or MOVE a file to itself.
  8599.        Unlike COMMAND.COM, 4DOS does full path and filename expansion
  8600.        before copying to ensure that files aren't inadvertently
  8601.        destroyed.
  8602.  
  8603.   Can't create
  8604.  
  8605.        4DOS can't create the specified file.  The disk may be full or
  8606.        write protected, the file already exists and is read-only, or the
  8607.        root directory is full.
  8608.  
  8609.   Can't delete
  8610.  
  8611.        4DOS can't delete the specified file or directory.  The disk is
  8612.        probably write protected.
  8613.  
  8614.   Can't find EXE file
  8615.  
  8616.        The loader (4DOS.COM) can't locate either 4DOS88.EXE or
  8617.        4DOS286.EXE.  At boot time, one of these files must be in the
  8618.        current directory, or the path must be specified with the /L
  8619.        switch (see Installation).  When starting a secondary shell, one
  8620.        of these files must be specified with the /L switch in the
  8621.        4DSHELL environment variable, or must be in the directory
  8622.        specified by COMSPEC.
  8623.  
  8624.   Can't get directory
  8625.  
  8626.        4DOS can't read the directory.  The disk drive is probably not
  8627.        ready.
  8628.  
  8629.   Can't make directory entry
  8630.  
  8631.        4DOS can't create the filename in the directory.  This is usually
  8632.        caused by a full root directory.  Create a subdirectory and move
  8633.        some of the files to it.
  8634.  
  8635.  
  8636.  
  8637.  
  8638.  
  8639.  
  8640.  
  8641.  
  8642.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       137 
  8643.  
  8644.  
  8645.   Can't open
  8646.  
  8647.        4DOS can't open the specified file; either it doesn't exist or
  8648.        the disk directory or File Allocation Table is damaged.
  8649.  
  8650.   Can't remove current directory
  8651.  
  8652.        MS-DOS can't delete your current directory.  Change to the parent
  8653.        directory and try again.
  8654.  
  8655.   Can't set up disk swap file
  8656.  
  8657.        The disk swap file you specified cannot be opened.  The path or
  8658.        drive is invalid, the disk is full, MS-DOS is out of file
  8659.        handles, or there is a hardware problem.  Check SHELL and
  8660.        4DSHELL.
  8661.  
  8662.   Command line too long
  8663.  
  8664.        The command exceeded 255 characters during alias and variable
  8665.        expansion, or you or your program attempted to pass a command
  8666.        line exceeding 126 characters to a secondary 4DOS shell
  8667.        (including the necessary alias, environment, and history
  8668.        settings).  Reduce the line length and/or use default alias,
  8669.        environment, and history sizes.
  8670.  
  8671.   Contents lost before copy
  8672.  
  8673.        COPY was appending files, and found one of the source files is
  8674.        the same as the target.  That source file is skipped, and
  8675.        appending continues with the next file.
  8676.  
  8677.   Data error
  8678.  
  8679.        MS-DOS can't read or write properly to the device.
  8680.  
  8681.   Directory stack empty
  8682.  
  8683.        POPD or DIRS can't find any entries in the directory stack.
  8684.  
  8685.   Disk is write protected
  8686.  
  8687.        The disk cannot be written to.  Check the disk and remove the
  8688.        write-protect tab if necessary.
  8689.  
  8690.  
  8691.  
  8692.  
  8693.  
  8694.  
  8695.  
  8696.  
  8697.  
  8698.  
  8699.  
  8700.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       138 
  8701.  
  8702.  
  8703.   Disk swap file corrupted
  8704.  
  8705.        The 4DOS disk swapping file (4DOSSWAP) has been moved, deleted,
  8706.        or damaged.  Reboot the system.
  8707.  
  8708.   Drive not ready--close door
  8709.  
  8710.        The floppy disk drive door is open.  Close the door and try
  8711.        again.
  8712.  
  8713.   EMS deallocation failed
  8714.  
  8715.        The loader (4DOS.COM) can't deallocate EMS memory when exiting
  8716.        from a secondary copy of 4DOS.  The EMS map has been corrupted or
  8717.        the loader's memory area has been destroyed by a program.  Reboot
  8718.        the system.
  8719.  
  8720.   EMS map save or restore failed
  8721.  
  8722.        4DOS cannot save or restore the EMS page map.  The EMS map has
  8723.        been corrupted, or memory has been destroyed by a program, or you
  8724.        have an incompatible EMS driver.  Try another swapping method.
  8725.  
  8726.   EMS mapping failed
  8727.  
  8728.        The loader (4DOS.COM) can't map EMS pages when swapping 4DOS to
  8729.        or from EMS.  The EMS map has been corrupted, or the loader's
  8730.        memory area has been destroyed by a program.  Reboot the system.
  8731.  
  8732.   EMS not available for swapping
  8733.  
  8734.        You requested EMS swapping but no EMS memory was available.
  8735.        Change your swapping method or free some EMS memory.
  8736.  
  8737.   Environment already saved
  8738.  
  8739.        You have already saved the environment with a previous SETLOCAL
  8740.        command.  You cannot nest SETLOCAL / ENDLOCAL pairs.
  8741.  
  8742.   Error reading
  8743.  
  8744.        MS-DOS experienced an I/O error when reading from a device.  This
  8745.        is usually caused by a bad disk, a device not ready, or a
  8746.        hardware error.
  8747.  
  8748.  
  8749.  
  8750.  
  8751.  
  8752.  
  8753.  
  8754.  
  8755.  
  8756.  
  8757.  
  8758.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       139 
  8759.  
  8760.  
  8761.   Error writing
  8762.  
  8763.        MS-DOS experienced an I/O error when writing to a device.  This
  8764.        is usually caused by a full disk, a bad disk, a device not ready,
  8765.        or a hardware error.
  8766.  
  8767.   Exceeded batch nesting limit
  8768.  
  8769.        You have attempted to nest batch files more than 4 levels deep.
  8770.  
  8771.   EXE file [seek | read | close] failed
  8772.  
  8773.        The loader (4DOS.COM) encountered an I/O error while attempting
  8774.        to access 4DOS88.EXE or 4DOS286.EXE.  Either the disk directory
  8775.        or FAT is corrupted, or one of these files has been damaged.  Run
  8776.        CHKDSK to verify the disk is OK, and reload 4DOS88 or 4DOS286
  8777.        from your distribution disk.
  8778.  
  8779.   Fatal error -- please reboot
  8780.  
  8781.        4DOS cannot continue due to the previous error.  Reboot the
  8782.        system.
  8783.  
  8784.   File Allocation Table bad
  8785.  
  8786.        MS-DOS can't access the FAT on the specified disk.  This can be
  8787.        caused by a bad disk or a hardware error.
  8788.  
  8789.   File exists
  8790.  
  8791.        The requested output file already exists, and 4DOS won't
  8792.        overwrite it.
  8793.  
  8794.   File not found
  8795.  
  8796.        4DOS couldn't find the specified file.  Check the spelling or
  8797.        path name.
  8798.  
  8799.   General failure
  8800.  
  8801.        This is usually a hardware problem, particularly a disk drive
  8802.        failure or a device not properly connected to a serial or
  8803.        parallel port.  Try to correct the problem or reboot and try
  8804.        again.
  8805.  
  8806.   Internal DOS error
  8807.  
  8808.        MS-DOS encountered an internal bug and failed.  Reboot the
  8809.        system.
  8810.  
  8811.  
  8812.  
  8813.  
  8814.  
  8815.  
  8816.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       140 
  8817.  
  8818.  
  8819.   Invalid date
  8820.  
  8821.        An invalid date was entered.  Check the syntax and reenter.
  8822.  
  8823.   Invalid drive
  8824.  
  8825.        A bad or non-existent disk drive was specified.
  8826.  
  8827.   Invalid load path specified, ignored
  8828.  
  8829.        You specified an invalid path in the /L option in SHELL or
  8830.        4DSHELL.
  8831.  
  8832.   Invalid MS-DOS version
  8833.  
  8834.        You need a newer version of MS-DOS to execute the specified
  8835.        command.
  8836.  
  8837.   Invalid parameter
  8838.  
  8839.        4DOS didn't recognize the a parameter.  Check the syntax and
  8840.        spelling.
  8841.  
  8842.   Invalid path
  8843.  
  8844.        The specified path does not exist.  Check the disk specification
  8845.        and/or spelling.
  8846.  
  8847.   Invalid swap path specified, using current drive and directory
  8848.  
  8849.        You specified an invalid path in the /S:B or /S:D option in SHELL
  8850.        or 4DSHELL.
  8851.  
  8852.   Invalid swapping option
  8853.  
  8854.        You specified an invalid value for the /S option in SHELL or
  8855.        4DSHELL.
  8856.  
  8857.   Invalid time
  8858.  
  8859.        An invalid time was entered.  Check the syntax and reenter.
  8860.  
  8861.   KEYSTACK.SYS not loaded
  8862.  
  8863.        You attempted to execute a KEYSTACK command without loading
  8864.        KEYSTACK.SYS in your CONFIG.SYS file (see Installation).
  8865.  
  8866.  
  8867.  
  8868.  
  8869.  
  8870.  
  8871.  
  8872.  
  8873.  
  8874.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       141 
  8875.  
  8876.  
  8877.   Label not found
  8878.  
  8879.        A GOTO or GOSUB referred to a non-existent label.  Check your
  8880.        batch file.
  8881.  
  8882.   Memory deallocation error
  8883.  
  8884.        The loader (4DOS.COM) can't deallocate memory while loading 4DOS.
  8885.        The MS-DOS memory allocation has been corrupted.  Reboot the
  8886.        system.
  8887.  
  8888.   Memory destroyed
  8889.  
  8890.        The DOS memory control blocks have been corrupted.  Reboot the
  8891.   system.
  8892.  
  8893.   Missing ENDTEXT
  8894.  
  8895.        A TEXT command is missing a matching ENDTEXT.  Check the batch
  8896.        file.
  8897.  
  8898.   Missing GOSUB
  8899.  
  8900.        4DOS cannot perform the RETURN command in a batch file.  You
  8901.        tried to do a RETURN without a GOSUB, or your batch file has been
  8902.        corrupted.
  8903.  
  8904.   Missing SETLOCAL
  8905.  
  8906.        4DOS encountered an ENDLOCAL without a matching SETLOCAL.
  8907.  
  8908.   No aliases defined
  8909.  
  8910.        No aliases were found in the environment.
  8911.  
  8912.   No closing quote
  8913.  
  8914.        4DOS couldn't find a second matching quote (` or ") on the
  8915.        command line.
  8916.  
  8917.   No file handle available
  8918.  
  8919.        This is an internal 4DOS disk swapping error.  Change to another
  8920.        swapping method if possible, and contact JP Software.
  8921.  
  8922.   No high memory available, environment will be placed in low memory
  8923.  
  8924.        You requested loading the environment in an XMS UMB via the
  8925.        /E:nnnU option in SHELL or 4DSHELL, but no UMB was available.
  8926.        Check your XMS driver.
  8927.  
  8928.  
  8929.  
  8930.  
  8931.  
  8932.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       142 
  8933.  
  8934.  
  8935.   No high memory available, resident portion will remain in low memory
  8936.  
  8937.        You requested relocation of the 4DOS resident portion to an XMS
  8938.        UMB via the /U option in SHELL or 4DSHELL, but no UMB was
  8939.        available.  Free some memory or check your XMS driver.
  8940.  
  8941.   Non-DOS disk
  8942.  
  8943.        MS-DOS can't read the disk.  Either the disk is bad, or it has
  8944.        been formatted by a different operating system.  Reformat it as
  8945.        an MS-DOS disk.
  8946.  
  8947.   Not an alias
  8948.  
  8949.        The specified argument is not in the 4DOS alias list.
  8950.  
  8951.   Not an EXE file
  8952.  
  8953.        4DOS88.EXE and/or 4DOS286.EXE is not recognized as an EXE file.
  8954.        Reload the file from your distribution disk.
  8955.  
  8956.   Not in environment
  8957.  
  8958.        The specified argument is not in the environment.
  8959.  
  8960.   Not ready
  8961.  
  8962.        The specified device can't be accessed.
  8963.  
  8964.   Not same device
  8965.  
  8966.        This error usually appears in RENAME.  You cannot rename a file
  8967.        to a different disk drive.
  8968.  
  8969.   Out of environment space
  8970.  
  8971.        4DOS has run out of environment space.  Edit the SHELL line in
  8972.        CONFIG.SYS file to increase the environment size.  Change the /E
  8973.        parameter to read:
  8974.  
  8975.             /E:n
  8976.  
  8977.        where n is a number from 256 to 32000), and reboot the machine.
  8978.  
  8979.  
  8980.  
  8981.  
  8982.  
  8983.  
  8984.  
  8985.  
  8986.  
  8987.  
  8988.  
  8989.  
  8990.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       143 
  8991.  
  8992.  
  8993.   Out of memory
  8994.  
  8995.        MS-DOS or 4DOS had insufficient free memory to execute the last
  8996.        command, or the DOS memory control blocks have been destroyed.
  8997.        If this error occurs in a secondary shell, return to the primary
  8998.        shell before running the command.  Otherwise, try to free some
  8999.        memory by removing memory-resident programs.  If the error
  9000.        persists, reboot the system.
  9001.  
  9002.   Out of paper
  9003.  
  9004.        MS-DOS detected an out-of-paper condition on one of the parallel
  9005.        printers (LPT1, LPT2, or LPT3).  Check your printer and add paper
  9006.        if necessary.
  9007.  
  9008.   Read error
  9009.  
  9010.        MS-DOS disk read error; usually caused by a bad disk or a non-DOS
  9011.        disk.
  9012.  
  9013.   Sector not found
  9014.  
  9015.        BIOS disk error; usually caused by a bad disk or a non-DOS disk.
  9016.  
  9017.   Seek error
  9018.  
  9019.        MS-DOS can't seek to the proper location on the disk.  This is
  9020.        generally caused by a bad disk or drive.
  9021.  
  9022.   SETLOCAL only valid in batch file
  9023.  
  9024.        The SETLOCAL command can only be used in a batch (.BAT or .BTM)
  9025.        file, not in an alias or from the command line.
  9026.  
  9027.   Swap file [seek | read | write] failed
  9028.  
  9029.        The 4DOS loader (4DOS.COM) encountered an I/O error while
  9030.        accessing the disk swap file (4DOSSWAP.nnn).  Either the disk was
  9031.        changed, or the file or loader's memory area has been destroyed
  9032.        by a program.  Reboot the system.
  9033.  
  9034.   Syntax error
  9035.  
  9036.        A command was entered with the improper format.
  9037.  
  9038.  
  9039.  
  9040.  
  9041.  
  9042.  
  9043.  
  9044.  
  9045.  
  9046.  
  9047.  
  9048.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       144 
  9049.  
  9050.  
  9051.   Too many open files
  9052.  
  9053.        MS-DOS has run out of file handles.  Try setting FILES=20 or more
  9054.        in the CONFIG.SYS file.
  9055.  
  9056.   Transient memory allocation error
  9057.  
  9058.        4DOS couldn't reserve memory for its transient portion (probably
  9059.        in a SWAPPING OFF command).  The memory control blocks have been
  9060.        destroyed, or a program has fragmented memory.  Reboot the
  9061.        system.
  9062.  
  9063.   Transient memory deallocation error
  9064.  
  9065.        4DOS couldn't release memory for its transient portion (probably
  9066.        in a SWAPPING ON command).  The memory control blocks have been
  9067.        destroyed, or a program has fragmented memory.  Reboot the
  9068.        system.
  9069.  
  9070.   Unknown command
  9071.  
  9072.        A command was entered that 4DOS didn't recognize and couldn't
  9073.        find in the current search path.  Check the spelling or PATH
  9074.        specification.
  9075.  
  9076.   Write error
  9077.  
  9078.        MS-DOS disk error; usually caused by a bad disk or a non-DOS
  9079.        disk.
  9080.  
  9081.   XMS deallocation failed
  9082.  
  9083.        4DOS could not deallocate XMS memory when exiting a secondary
  9084.        shell.  XMS memory has been destroyed; reboot your system.
  9085.  
  9086.   XMS move failed
  9087.  
  9088.        4DOS could not move data between DOS memory and XMS memory while
  9089.        swapping itself.  XMS memory has been destroyed; reboot your
  9090.        system.
  9091.  
  9092.   XMS not available for swapping
  9093.  
  9094.        You requested XMS swapping but no XMS memory is available.
  9095.        Change your swapping method or free some XMS memory.
  9096.  
  9097.  
  9098.  
  9099.  
  9100.  
  9101.  
  9102.  
  9103.  
  9104.  
  9105.  
  9106.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       145 
  9107.  
  9108.  
  9109.   Appendix B - ASP
  9110.  
  9111.        The authors and publisher of 4DOS are members of the Association
  9112.        of Shareware Professionals (ASP), an organization formed in April
  9113.        1987 to strengthen the future of shareware as an alternative to
  9114.        commercial software.  Its members, all of whom are programmers
  9115.        who subscribe to a code of ethics, are committed to the concept
  9116.        of shareware as a method of marketing.
  9117.  
  9118.        The ASP's Standards for its members and their shareware products
  9119.        are:
  9120.  
  9121.          Programming Standards
  9122.  
  9123.             The program meets the ASP's definition of "shareware" (i.e.,
  9124.             it is not a commercial demo with a major feature disabled,
  9125.             nor a time-limited program).
  9126.  
  9127.             The program has been thoroughly tested by the author and
  9128.             should not be harmful to other files or hardware if used
  9129.             properly.
  9130.  
  9131.          Documentation Standards
  9132.  
  9133.             Sufficient documentation is provided to allow the average
  9134.             user to try all the major functions of the program.
  9135.  
  9136.             Any discussion of the shareware concept and of registration
  9137.             requirements is done in a professional and positive manner.
  9138.  
  9139.          Support Standards
  9140.  
  9141.             The member will respond to people who send registration
  9142.             payments, as promised in the program's documentation.  At a
  9143.             minimum, the member will acknowledge receipt of all
  9144.             payments.
  9145.  
  9146.             The member will establish a procedure for users to report,
  9147.             and have acknowledged, matters such as bug reports, and will
  9148.             describe such means in the documentation accompanying all
  9149.             versions of the programs.  The author will respond to
  9150.             written bug reports from registered users when the user
  9151.             provides a self-addressed, stamped envelope.
  9152.  
  9153.             Known incompatibilities with other software or hardware and
  9154.             major or unusual program limitations are noted in the
  9155.             documentation that comes with the shareware (evaluation)
  9156.             program.
  9157.  
  9158.  
  9159.  
  9160.  
  9161.  
  9162.  
  9163.  
  9164.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       146 
  9165.  
  9166.  
  9167.          ASP Ombudsman Information
  9168.  
  9169.             This program is produced by members of the Association of
  9170.             Shareware Professionals (ASP).  ASP wants to make sure that
  9171.             the shareware principle works for you.  If you are unable to
  9172.             resolve a shareware-related problem with an ASP member by
  9173.             contacting the member directly, ASP may be able to help.
  9174.             The ASP ombudsman can help you resolve a dispute or problem
  9175.             with an ASP member, but does not provide technical support
  9176.             for members' products.  Please write to the ASP Ombudsman
  9177.             at:
  9178.  
  9179.                       ASP Ombudsman
  9180.                       P.O. Box 5786
  9181.                       Bellevue, WA  98006
  9182.  
  9183.             or send a Compuserve message via Easyplex electronic mail to
  9184.             the ASP Ombudsman, Compuserve ID number 70475,1071.
  9185.  
  9186.  
  9187.  
  9188.  
  9189.  
  9190.  
  9191.  
  9192.  
  9193.  
  9194.  
  9195.  
  9196.  
  9197.  
  9198.  
  9199.  
  9200.  
  9201.  
  9202.  
  9203.  
  9204.  
  9205.  
  9206.  
  9207.  
  9208.  
  9209.  
  9210.  
  9211.  
  9212.  
  9213.  
  9214.  
  9215.  
  9216.  
  9217.  
  9218.  
  9219.  
  9220.  
  9221.  
  9222.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       147 
  9223.  
  9224.  
  9225.   Appendix C - Key Codes
  9226.  
  9227.        Here are some of the extended key codes used by the INKEY and
  9228.        KEYSTACK commands (see the Command Reference Guide):
  9229.  
  9230.  
  9231.        F1 - @59  Alt-F1 - @104  Ctl-F1 - @94   Shift-F1 - @84
  9232.        F2 - @60  Alt-F2 - @105  Ctl-F2 - @95   Shift-F2 - @85
  9233.        F3 - @61  Alt-F3 - @106  Ctl-F3 - @96   Shift-F3 - @86
  9234.        F4 - @62  Alt-F4 - @107  Ctl-F4 - @97   Shift-F4 - @87
  9235.        F5 - @63  Alt-F5 - @108  Ctl-F5 - @98   Shift-F5 - @88
  9236.        F6 - @64  Alt-F6 - @109  Ctl-F6 - @99   Shift-F6 - @89
  9237.        F7 - @65  Alt-F7 - @110  Ctl-F7 - @100  Shift-F7 - @90
  9238.        F8 - @66  Alt-F8 - @111  Ctl-F8 - @101  Shift-F8 - @91
  9239.        F9 - @67  Alt-F9 - @112  Ctl-F9 - @102  Shift-F9 - @92
  9240.        F10 - @68 Alt-F10 - @113 Ctl-F10- @103  Shift-F10 - @93
  9241.  
  9242.        Home      @71       Up        @72       PgUp @73
  9243.        Left      @75                           Right @77
  9244.        End       @79       Down      @80       PgDn @81
  9245.        Insert    @82       Del       @83
  9246.  
  9247.        Ctl-Home  @119                           Ctl-PgUp  @132
  9248.        Ctl-Left  @115                           Ctl-Right @116
  9249.        Ctl-End   @117                           Ctl-PgDn  @118
  9250.  
  9251.        Alt-A -@30    Alt-N -@49     Alt-1 - @120
  9252.        Alt-B -@48    Alt-O -@24     Alt-2 - @121
  9253.        Alt-C -@46    Alt-P -@25     Alt-3 - @122
  9254.        Alt-D -@32    Alt-Q -@16     Alt-4 - @123
  9255.        Alt-E -@18    Alt-R -@19     Alt-5 - @124
  9256.        Alt-F -@33    Alt-S -@31     Alt-6 - @125
  9257.        Alt-G -@34    Alt-T -@20     Alt-7 - @126
  9258.        Alt-H -@35    Alt-U -@22     Alt-8 - @127
  9259.        Alt-I -@23    Alt-V -@47     Alt-9 - @128
  9260.        Alt-J -@36    Alt-W -@17     Alt-0 - @129
  9261.        Alt-K -@37    Alt-X -@45
  9262.        Alt-L -@38    Alt-Y -@21
  9263.        Alt-M -@50    Alt-Z -@44
  9264.  
  9265.  
  9266.  
  9267.  
  9268.  
  9269.  
  9270.  
  9271.  
  9272.  
  9273.  
  9274.  
  9275.  
  9276.  
  9277.  
  9278.  
  9279.  
  9280.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       148 
  9281.  
  9282.  
  9283.   Appendix D - Programming for 4DOS
  9284.  
  9285.        From a batch file, you can test if 4DOS is loaded with the variable
  9286.        function @EVAL (see Environment Variables):
  9287.  
  9288.             if "%@eval[2+2]" == "4" echo 4DOS is loaded!
  9289.  
  9290.        A program can test for the presence of 4DOS by making an INT 2Fh
  9291.        call.  On entry:
  9292.  
  9293.             AX = D44Dh
  9294.             BX = 0
  9295.  
  9296.        If 4DOS is loaded it will return:
  9297.  
  9298.             AX = 44DDh
  9299.             BX = Version number (BL = major version, BH = minor version)
  9300.             CX = 4DOS PSP segment address
  9301.             DL = 4DOS shell number (0 for the root shell, 1 for the
  9302.                  second, etc.).  The shell number is incremented each
  9303.                  time a new copy of 4DOS is loaded, either in a
  9304.                  different multitasker window (for example, DESQview),
  9305.                  or via nested shells.
  9306.  
  9307.        This function is only available in swapping mode.  It tells you
  9308.        if 4DOS is loaded in memory, but not whether it is the parent
  9309.        process of your program.  You can determine if 4DOS is the parent
  9310.        process by comparing the PSP value returned in CX to the PSP
  9311.        chain pointer at offset 16h in your program's PSP.
  9312.  
  9313.        4DOS also generates two different INT 2F calls to allow TSRs or
  9314.        other programs to tell when 4DOS is at the prompt.  These calls
  9315.        have AX = D44Eh.  The first occurs immediately before displaying the
  9316.        prompt, with BX = 0; the second occurs after displaying the prompt
  9317.        and immediately before accepting keyboard input, with BX =1.  Any
  9318.        routine intercepting these calls should preserve at least the SI,
  9319.        DI, BP, SP, DS, ES, and SS registers.
  9320.  
  9321.        You can put keystrokes into the KEYSTACK driver via the MS-DOS
  9322.        IOCTL call.  First, open the device 4DOSSTAK:
  9323.  
  9324.             MOV   AX,3D01h
  9325.             DS:DX = pointer to the device name "4DOSSTAK"
  9326.             INT   21h
  9327.  
  9328.        The file handle will be returned in AX.  Then send the string to
  9329.        the KEYSTACK device driver:
  9330.  
  9331.             MOV   BX,AX
  9332.             MOV   AX,4403h
  9333.             CX = string length
  9334.             DS:DX = pointer to string
  9335.             INT   21h
  9336.  
  9337.  
  9338.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       149 
  9339.  
  9340.  
  9341.   Appendix E - Tips and Troubleshooting
  9342.  
  9343.        This appendix covers general usage notes and troubleshooting
  9344.        information about 4DOS.  It will help you figure out what to do
  9345.        if you're having trouble with 4DOS, or compatibility problems
  9346.        with another software package.
  9347.  
  9348.        What isn't covered here is information on compatibility with
  9349.        specific hardware or individual software packages.   Because this
  9350.        information is subject to change as 4DOS and other programs are
  9351.        modified, we have included it in the file COMPAT.DOC, which is
  9352.        distributed with 4DOS.  This file is updated with every new
  9353.        release to reflect the latest compatibility information.  It
  9354.        should be read in conjunction with this appendix.
  9355.  
  9356.   Installation and Boot
  9357.  
  9358.        Most 4DOS installation problems occur because the instructions in
  9359.        the manual have not been followed correctly.  If you have
  9360.        trouble, re-read the instructions carefully and see if they cover
  9361.        the problem you're having.  If not, try the information below.
  9362.  
  9363.        If you have questions about booting 4DOS on a system attached to
  9364.        a network, see the section in this appendix Using 4DOS on a
  9365.        Network.
  9366.  
  9367.        If you get a message such as "missing command interpreter" or
  9368.        "can't find EXE file", you probably have the 4DOS files in the
  9369.        wrong place.  4DOS is easiest to install when its system files
  9370.        (KEYSTACK.SYS, 4DOS.COM, and 4DOS88.EXE or 4DOS286.EXE) are
  9371.        stored in the root directory of your boot disk.  If they aren't,
  9372.        be sure the SHELL command in CONFIG.SYS has the correct drive and
  9373.        path for 4DOS.COM, and that the /L: switch is set properly.  Also
  9374.        be sure that you are setting COMSPEC properly in AUTOEXEC.BAT, or
  9375.        secondary shells won't load correctly.
  9376.  
  9377.        If the system hangs after 4DOS is loaded (i.e., while processing
  9378.        4START.BAT or AUTOEXEC.BAT), edit AUTOEXEC to remove the program
  9379.        being loaded at the point where the hang occurs, and try again.
  9380.        If problems are inconsistent or persist, edit CONFIG.SYS and
  9381.        AUTOEXEC.BAT to remove all of the device drivers and TSRs that
  9382.        you can reasonably remove and still have the system boot.  Then
  9383.        put them back one at a time until you find out what program or
  9384.        combination of programs is causing the problem.
  9385.  
  9386.        If you have trouble with keyboard device drivers or TSRs
  9387.        (including those that use "hot keys"), try removing KEYSTACK.SYS
  9388.        to see if there is a conflict between it and the other program.
  9389.        If the KEYSTACK command fails to work, try loading it as late as
  9390.        possible in CONFIG.SYS; another device driver may be stealing the
  9391.        keyboard interrupt and failing to pass it along to KEYSTACK.
  9392.  
  9393.  
  9394.  
  9395.  
  9396.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       150 
  9397.  
  9398.  
  9399.        If you have trouble booting 4DOS, or see garbage characters in
  9400.        your environment immediately after boot, check the length of your
  9401.        SHELL command.  As discussed in Installation, the line may not
  9402.        have more than 33 characters beyond the name of the shell
  9403.        (including trailing spaces), due to a bug in all versions of MS-
  9404.        DOS and PC-DOS.
  9405.  
  9406.   AUTOEXEC and 4START Problems
  9407.  
  9408.        If you follow the instructions in the manual, both of these files
  9409.        should work with no trouble.  Some common problems are:
  9410.  
  9411.          1.  AUTOEXEC.BAT is not executed when the primary shell is
  9412.          started.  This occurs because you did not put a /P in the SHELL
  9413.          command, or the AUTOEXEC.BAT file is not in the root directory
  9414.          of the boot drive.
  9415.  
  9416.          2.  AUTOEXEC.BAT is executed when a secondary shell is started.
  9417.          You've put a call to AUTOEXEC.BAT into 4START, moved the
  9418.          contents of AUTOEXEC.BAT into 4START, or called 4DOS with a /P
  9419.          option on the command line.  4START should only be used for
  9420.          commands to be executed when any shell is started.  Commands
  9421.          for the primary shell should go in AUTOEXEC.BAT.
  9422.  
  9423.          3.  4START is not executed when a secondary shell is started.
  9424.          This is because 4DOS cannot find 4START.   4START must be a
  9425.          .BAT or .BTM file, located in the root directory of the drive
  9426.          COMSPEC points to.
  9427.  
  9428.  
  9429.  
  9430.  
  9431.  
  9432.  
  9433.  
  9434.  
  9435.  
  9436.  
  9437.  
  9438.  
  9439.  
  9440.  
  9441.  
  9442.  
  9443.  
  9444.  
  9445.  
  9446.  
  9447.  
  9448.  
  9449.  
  9450.  
  9451.  
  9452.  
  9453.  
  9454.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       151 
  9455.  
  9456.  
  9457.   Booting from a Floppy Disk
  9458.  
  9459.        4DOS will boot properly from a floppy disk, as long as cautions
  9460.        about file locations are observed carefully.
  9461.  
  9462.        4DOS.COM, KEYSTACK.SYS, and 4DOSxx.EXE should be placed in the
  9463.        root directory of the floppy disk, and the SHELL and DEVICE
  9464.        commands should point to them.  If your system has a hard disk,
  9465.        the files can be placed there instead; be sure to set the /L:
  9466.        switch so the 4DOS EXE file can be found.
  9467.  
  9468.        When you boot from a floppy disk, 4DOS sets COMSPEC to point to
  9469.        that disk (e.g. A:\4DOS.COM), regardless of where the 4DOS files
  9470.        are loaded from (it isn't possible for the primary shell to
  9471.        determine where it was loaded from and set COMSPEC accordingly).
  9472.        If you are booting from a floppy disk on a system with a hard
  9473.        disk, and you want secondary shells to load 4DOS from the hard
  9474.        disk, you MUST set the COMSPEC yourself in AUTOEXEC.BAT to point
  9475.        to the hard disk copy of 4DOS.
  9476.  
  9477.        When using a pipe the temporary files created are written to the
  9478.        root directory of the boot drive.  If you are booting from a
  9479.        floppy disk and want pipe temporary files to be written elsewhere
  9480.        (e.g. to a hard disk), set the TMP environment variable to point
  9481.        to the correct path.  See Redirection in Using 4DOS for details
  9482.        on pipes and TMP.
  9483.  
  9484.        The AUTOEXEC and 4START batch files are always loaded from the
  9485.        root directory of the boot drive when starting the primary shell,
  9486.        so they will have to be on the floppy disk.  The 4START file for
  9487.        secondary shells is loaded from the root directory of the drive
  9488.        COMSPEC points to, so if you are using 4START and change COMSPEC
  9489.        be sure to make a copy of 4START on the new drive.
  9490.  
  9491.   Hardware Errors
  9492.  
  9493.        4DOS is compatible with virtually all PC hardware, including a
  9494.        wide variety of systems, memory configurations, disk drives,
  9495.        keyboards, and so on.  While compatibility problems between 4DOS
  9496.        and your hardware could occur, hardware problems which appear to
  9497.        be due to 4DOS are usually found to be due to the hardware
  9498.        itself, or to other software.
  9499.  
  9500.        4DOS performs ALL disk I/O through standard MS-DOS calls.  We
  9501.        have avoided including capabilities which require direct access
  9502.        to the disk , in order to maintain the maximum level of
  9503.        compatibility with your disk hardware.  There are no known
  9504.        incompatibilities between 4DOS and disk drive hardware or
  9505.        partitioning software.  4DOS is compatible with the large (over
  9506.        32 MB) disk volumes created by Compaq DOS 3.31 and MS-DOS / PC-
  9507.        DOS 4.0.
  9508.  
  9509.  
  9510.  
  9511.  
  9512.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       152 
  9513.  
  9514.  
  9515.        If you find that you are having trouble with a disk drive while
  9516.        running under 4DOS, check carefully to see what the problem is
  9517.        and whether it can be reproduced under COMMAND.COM.  There has
  9518.        never been a documented instance of damage to a directory or FAT
  9519.        due to a problem in 4DOS.  When such problems occur it is
  9520.        understandable that a new part of the operating system is the
  9521.        first thing suspected of causing them, but in the few cases we
  9522.        have heard about the problem has always turned out to be due to
  9523.        hardware problems or errors in applications software.
  9524.  
  9525.   Memory
  9526.  
  9527.        4DOS does its best to detect and properly access all the types of
  9528.        memory your PC can have:  MS-DOS RAM, EMS, XMS, and extended
  9529.        memory.  4DOS' access to these areas is always through standard
  9530.        documented methods.  If you want to know whether 4DOS sees your
  9531.        system's memory accurately, check the output of the MEMORY
  9532.        command.
  9533.  
  9534.        Note that the output of MEMORY will show slightly more free MS-
  9535.        DOS RAM than is shown by CHKDSK and some memory map programs.
  9536.        This is because these programs do not count their own environment
  9537.        space as free space.  When 4DOS is running this space is not
  9538.        occupied by a program's environment, and hence appears to be
  9539.        free.
  9540.  
  9541.        MEMORY's report of free space includes the space occupied by the
  9542.        4DOS transient portion, at the end of MS-DOS memory (this space
  9543.        is freed whenever an application is run).  While 4DOS is running
  9544.        this space is reserved, and is not available to 4DOS itself for
  9545.        use by commands which allocate DOS memory (COPY, DIR, LIST,
  9546.        SELECT, SETLOCAL, and the processing of .BTM files).  If you use
  9547.        one of these features and receive an "out of memory" error when
  9548.        running in  relatively limited (under 90K) memory (e.g., when
  9549.        shelled to 4DOS from an application), the problem may be there is
  9550.        not enough room for both 4DOS itself, and the memory to perform
  9551.        the command, despite what appears to be a reasonable amount of
  9552.        free RAM when looking at the output of MEMORY.
  9553.  
  9554.        4DOS EMS swapping sometimes has difficulty with EMS drivers which
  9555.        do not fully meet the EMS 3.2 specifications (4DOS supports, but
  9556.        does not require, EMS 4.0).  If you have trouble accessing EMS
  9557.        for swapping, check COMPAT.DOC to see if there are any known
  9558.        problems with your EMS board or the associated driver software.
  9559.  
  9560.  
  9561.  
  9562.  
  9563.  
  9564.  
  9565.  
  9566.  
  9567.  
  9568.  
  9569.  
  9570.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       153 
  9571.  
  9572.  
  9573.   Critical Errors
  9574.  
  9575.        A "critical" error is an error that gives you the "Abort, Retry,
  9576.        Fail" message.  When running 4DOS, this message appears as
  9577.        follows:
  9578.  
  9579.             [Error message]
  9580.             R(etry), I(gnore), F(ail), or A(bort)?
  9581.  
  9582.        The error message on the first line explains the error that has
  9583.        occurred, and the device it occurred on.  The second line prompts
  9584.        for your choice of action (the Fail choice will not be displayed
  9585.        under MS-DOS 2).
  9586.  
  9587.        A critical error usually indicates a hardware malfunction.  The
  9588.        error may be that the device doesn't exist, there is no disk in
  9589.        the drive, the network has gone down, or a data error occurred.
  9590.        In most cases you will choose R to retry the operation, or A to
  9591.        abort the operation.  Choose I(gnore) at your peril: this
  9592.        response will cause 4DOS to proceed as if the error had not
  9593.        occurred!
  9594.  
  9595.        F(ail) will tell 4DOS that the operation it was attempting has
  9596.        failed, which will generally produce another error message.  For
  9597.        example, if you attempt to do a
  9598.        directory on drive A with no disk in the drive, and answer F to
  9599.        the resulting critical error, you will get an additional error
  9600.        message, "Invalid drive A".
  9601.  
  9602.        Many programs install their own critical error handlers.  If you
  9603.        get a critical error message within an application and the second
  9604.        line does not read as shown above, the message probably did not
  9605.        come from 4DOS, and any problem in handling your response
  9606.        properly is due to the application, and not to 4DOS.
  9607.  
  9608.        Choosing A to abort within an application may abort the entire
  9609.        application, and not just the operation being performed,
  9610.        depending on which critical error handler is in use (4DOS' or the
  9611.        applications's), and how the application's critical error handler
  9612.        (if any) is designed.
  9613.  
  9614.  
  9615.  
  9616.  
  9617.  
  9618.  
  9619.  
  9620.  
  9621.  
  9622.  
  9623.  
  9624.  
  9625.  
  9626.  
  9627.  
  9628.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       154 
  9629.  
  9630.  
  9631.   Video
  9632.  
  9633.        4DOS is compatible with most display adapters and monitors.
  9634.        However as with any software package, you may have to configure
  9635.        4DOS to run properly on your system.
  9636.  
  9637.        4DOS uses two methods of displaying text on the screen:
  9638.  
  9639.          1.  Prompts and normal messages call DOS to write text to the
  9640.          screen.  If you use an ANSI driver, it will process these
  9641.          calls.  Otherwise, DOS will transmit the text to the BIOS (the
  9642.          I/O software which comes on your system or video board) to
  9643.          display it on your screen.  This method for displaying text
  9644.          will work on all MS-DOS systems, regardless of video type.
  9645.  
  9646.          2.  The DRAWBOX, DRAWHLINE, DRAWVLINE, LIST, SELECT, and SCRPUT
  9647.          commands bypass MS-DOS, the BIOS, and ANSI, and write text
  9648.          directly to video memory.  These commands will only work on
  9649.          systems with 100% PC-compatible video.  On other systems,
  9650.          results will be unpredictable at best.  If you have such a
  9651.          system, you probably know it already, as most PC applications
  9652.          will have similar problems.
  9653.  
  9654.   Video Cursor
  9655.  
  9656.        The video cursor shape is defined by "start" and "stop" line
  9657.        numbers within a character "cell" (the space occupied by one
  9658.        character on the screen).   Typical cell sizes are 14 lines on a
  9659.        monochrome or EGA system, and 8 lines on a CGA system; other
  9660.        video cards will have varying cell sizes.
  9661.  
  9662.        4DOS reads the cursor shape at boot, and defines that as the
  9663.        default shape.  The shape used by 4DOS can be adjusted with
  9664.        SETDOS /Sb:e, where b is the beginning line and e is the ending
  9665.        line.  To see what values 4DOS is using, run SETDOS with no
  9666.        parameters.  The shape defined in SETDOS is used for the default
  9667.        editing mode (set by SETDOS /M).  The "other" editing mode (e.g.,
  9668.        if overstrike is the default then insert is the other mode) uses
  9669.        a cursor that starts at line 0 and ends on the same line as the
  9670.        default cursor.
  9671.  
  9672.        If you have trouble with the cursor, experiment with the SETDOS
  9673.        /S command until you find a setting that works for your system.
  9674.        Note that you will have to reduce the SETDOS cursor settings if
  9675.        you switch an EGA or VGA to 43-line or 50-line mode.  The cursor
  9676.        lines in 25-line mode use a larger character cell, and lie
  9677.        outside the smaller 43-line or 50-line cell, making the cursor
  9678.        invisible.
  9679.  
  9680.        If you find the cursor has disappeared and the problem is not
  9681.        addressed by SETDOS /S, it is probably due to screen color
  9682.        problems.  The cursor is shown in the color of the underlying
  9683.  
  9684.  
  9685.  
  9686.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       155 
  9687.  
  9688.  
  9689.        character cell.  If that cell has (for example) the color
  9690.        attributes of black on black, the cursor will be invisible.  If
  9691.        you have an ANSI driver installed, you can test this out easily
  9692.        by clearing the screen to a known color (see CLS in the Command
  9693.        Reference Guide).  The cursor should reappear.  If the problem
  9694.        persists, you will need to determine what is setting your screen
  9695.        attributes to an invisible color.  One common source of this
  9696.        problem is use of an ANSI driver for 43-line or 50-line mode on
  9697.        an EGA/VGA system when the ANSI driver does not support these
  9698.        modes.
  9699.  
  9700.   Screen Length
  9701.  
  9702.        The SETDOS /R command sets the 4DOS screen length.  It will not
  9703.        cause 4DOS to attempt to change the video mode; it is an internal
  9704.        variable used to determine display length for LIST, SELECT, and
  9705.        those commands which have a "pause" option (TYPE /P, DIR /P,
  9706.        etc.).  4DOS normally determines the screen length from the BIOS.
  9707.        If you have a non-standard display and/or have trouble with the
  9708.        default screen length, try correcting it with SETDOS /R.
  9709.  
  9710.        SETDOS /R will NOT affect display scrolling at the command
  9711.        prompt.  This scrolling is handled by ANSI and/or your system
  9712.        BIOS.  If you have an EGA or VGA, and have put the screen in 43-
  9713.        line or 50-line mode, you may find that the display still scrolls
  9714.        at the 25th line.  This is usually because your ANSI driver is
  9715.        not properly supporting the extended screen length; it is not a
  9716.        4DOS problem.
  9717.  
  9718.   ANSI.SYS
  9719.  
  9720.        ANSI.SYS is a device driver, normally installed in your
  9721.        CONFIG.SYS file, which allows control of a variety of screen
  9722.        characteristics via strings of characters sent to the screen.
  9723.        Most versions of MS-DOS include a copy of ANSI.SYS, and there are
  9724.        a number of more powerful versions available as public-domain,
  9725.        shareware, or retail products.
  9726.  
  9727.        The only 4DOS commands requiring ANSI.SYS are CLS and COLOR.  CLS
  9728.        will always clear the screen, but will ignore color
  9729.        specifications if ANSI.SYS is not installed.  COLOR will work
  9730.        ONLY if you have an ANSI driver installed.
  9731.  
  9732.        4DOS normally detects automatically whether an ANSI driver is
  9733.        installed.  If you have ANSI installed and 4DOS doesn't seem to
  9734.        recognize it (e.g., CLS BRIGHT WHITE ON BLUE still leaves the
  9735.        screen in white on black), try SETDOS /A1, which forces 4DOS to
  9736.        use ANSI commands.
  9737.  
  9738.  
  9739.  
  9740.  
  9741.  
  9742.  
  9743.  
  9744.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       156 
  9745.  
  9746.  
  9747.   4DOS and COMMAND.COM
  9748.  
  9749.        4DOS is designed to be 99% compatible with the standard MS-DOS
  9750.        command interpreter, COMMAND.COM.  In virtually all cases
  9751.        commands will work identically under 4DOS and COMMAND.COM.
  9752.        However, 4DOS has improved on COMMAND.COM in a number of areas,
  9753.        and on rare occasions these improvements produce a conflict.
  9754.  
  9755.        In some cases 4DOS command output differs from COMMAND.COM in
  9756.        order to provide enhancements.  For example, the default DIR
  9757.        display is in alphabetical order, rather than physical order as
  9758.        in COMMAND.COM.  The filenames are also in lower case, rather
  9759.        than upper case.  With DIR, as in most such cases, command
  9760.        options allow you to specify output that is closer to or exactly
  9761.        the same as COMMAND.COM.
  9762.  
  9763.        COMMAND.COM also contains bugs or quirks which are not part of
  9764.        its documented behavior, and some programmers and users have
  9765.        chosen to rely on these bugs and quirks in writing their batch
  9766.        files and programs.  4DOS does not emulate some of these quirks -
  9767.        in some cases to do so would be wrong; in others it would hinder
  9768.        useful features of 4DOS.
  9769.  
  9770.        The only specific compatibility difference we are aware of
  9771.        between 4DOS and COMMAND.COM that is unrelated to undocumented
  9772.        "features" is in handling batch file variables.  4DOS allows 128
  9773.        batch variables (%0 to %127), and COMMAND.COM only 10 (%0 to %9).
  9774.        COMMAND.COM therefore only considers the first digit after the
  9775.        "%" as part of the variable name.  As a result, a string like
  9776.        "%10A" will be interpreted by 4DOS as "the value of batch
  9777.        variable 10, followed by the character A", and by COMMAND.COM as
  9778.        "the value of batch variable 1, followed by the characters 0A".
  9779.        However, you can force 4DOS to make the same interpretation as
  9780.        COMMAND.COM by using the "%[varname]" feature:  the string
  9781.        "%[1]0A" will be interpreted the same way COMMAND.COM interprets
  9782.        "%10A".
  9783.  
  9784.        Some users have renamed 4DOS.COM to COMMAND.COM.  This will work
  9785.        provided you set COMSPEC properly (see Installation), and may be
  9786.        necessary to deal with programs that ignore COMSPEC and call
  9787.        COMMAND.COM directly.  However, we do NOT recommend this approach
  9788.        under most circumstances.  It will cause the DOS FORMAT /S
  9789.        command to copy 4DOS.COM rather than COMMAND.COM when creating a
  9790.        bootable floppy disk.  Such a disk will not in fact be bootable
  9791.        because the 4DOS EXE file will not be on it, and you may not want
  9792.        it to boot with 4DOS in any case.  It may also lead to confusion
  9793.        when someone else looks at your disk and sees a file called
  9794.        COMMAND.COM that isn't really COMMAND.COM.
  9795.  
  9796.  
  9797.  
  9798.  
  9799.  
  9800.  
  9801.  
  9802.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       157 
  9803.  
  9804.   Using 4DOS on a Network
  9805.  
  9806.        4DOS is compatible with most MS-DOS-compatible networks.  This
  9807.        section will give you some tips on using 4DOS properly on a
  9808.        network, and on the locations used for 4DOS files on a network.
  9809.  
  9810.        If you need to boot from a network drive (i.e., on a diskless
  9811.        workstation), you must have the network drive accessible at boot
  9812.        time.  If this condition is satisfied (so 4DOS can find its files
  9813.        on the network drives), the standard options can be used to load
  9814.        4DOS from the network drive.
  9815.  
  9816.        When using 4DOS on a network, you must pay careful attention to
  9817.        where files are stored in order to be sure that two 4DOS users do
  9818.        not attempt to access the same file at the same time.  When
  9819.        swapping to disk (either explicitly with the /S:D option, or
  9820.        implicitly because best guess swapping is used and no EMS or XMS
  9821.        is available), you must be sure that no two users ever use the
  9822.        same directory for their disk swap files, since the filenames
  9823.        (4DOSSWAP.000, .001, etc.) will conflict.  This includes swap
  9824.        files created by shelling to 4DOS from a program, or running
  9825.        secondary shells implicitly (e.g. with a MAKE utility).  Set the
  9826.        swap file location explicitly with the /S option, assigning each
  9827.        user's swap files to a different directory on the network drive.
  9828.  
  9829.        The primary shell's swap file location is controlled by the /S
  9830.        option in CONFIG.SYS.  For instance, the following command will
  9831.        boot 4DOS with best guess swapping and store any disk swap file
  9832.        created in directory F:\USERA:
  9833.  
  9834.             shell=c:\ /s:bf:\usera
  9835.  
  9836.        The swap file location for secondary shells is controlled by the
  9837.        4DSHELL environment variable (see Installation).  Using the above
  9838.        example, the appropriate setting for 4DSHELL would be:
  9839.  
  9840.             set 4dshell=/s:bf:\usera
  9841.  
  9842.        Both SHELL and 4DSHELL must be set properly to ensure that there
  9843.        are no problems with disk swap files on your network.  Note that
  9844.        if you set up the SHELL command and 4DSHELL to force EMS or XMS
  9845.        swapping (/S:E or /S:X), there is no need to set up a separate
  9846.        directory for each user for this purpose as there will be no disk
  9847.        swap files.
  9848.  
  9849.        Pipes are methods of passing information from one program to
  9850.        another, and are invoked with the pipe symbol | on the command
  9851.        line (see I/O Redirection in Using 4DOS).  Pipes work by taking
  9852.        the output from one program, storing it in a temporary file, then
  9853.        telling a second program to obtain its input from that file.  The
  9854.        temporary files, named P.1$$ and P.2$$, are placed by default in
  9855.        the root directory of the boot drive, but can be placed on a
  9856.        different drive and directory by setting the TMP environment
  9857.        variable.
  9858.  
  9859.  
  9860.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       158 
  9861.  
  9862.  
  9863.        If you choose to set TMP, or if you have a system where multiple
  9864.        users can boot from the same directory, the same cautions given
  9865.        for disk swapping must be followed for pipe temporary files; that
  9866.        is, you must ensure that each user's pipe temporary files go to a
  9867.        separate directory.  For example, for the user in the examples
  9868.        for disk swapping above, the pipe temporary files can be set to
  9869.        go the same directory by placing this command in AUTOEXEC.BAT:
  9870.  
  9871.             set tmp=f:\usera
  9872.  
  9873.   Common Questions and Problems
  9874.  
  9875.        This section covers a variety of problems and questions which
  9876.        come up regularly in technical support calls and messages, and
  9877.        which are not covered by the sections above.  If you have
  9878.        questions about compatibility with a specific software product,
  9879.        refer to COMPAT.DOC.
  9880.  
  9881.        When you find another piece of software that appears to be
  9882.        incompatible with 4DOS, there are several techniques you can try
  9883.        to determine where the problem lies.  Even if these methods are
  9884.        not workable as a permanent solution, they will provide valuable
  9885.        information as to the nature of the problem.
  9886.  
  9887.        Try removing all of the device drivers and TSRs you can from
  9888.        CONFIG.SYS and AUTOEXEC.BAT (including KEYSTACK.SYS), and see if
  9889.        the problem persists.  If it doesn't, put the drivers and TSRs
  9890.        back one at a time until you find the conflict.  Many apparent
  9891.        two-way compatibility problems ("4DOS and package X don't work
  9892.        together") turn out to be three-way interactions between 4DOS,
  9893.        the problem program, and a device driver or TSR.
  9894.  
  9895.        If the program you are having trouble with uses EMS memory and
  9896.        you are using EMS swapping, you can try changing to disk swapping
  9897.        to see if the problem goes away.  The same is true for XMS
  9898.        swapping and programs which use XMS.
  9899.  
  9900.        If you are using the /U option on a system with XMS memory, try
  9901.        removing it to see if the program cannot work when the command
  9902.        processor is loaded high.
  9903.  
  9904.        If the program is not a TSR, try running it under COMMAND.COM.
  9905.        For example, if COMMAND.COM is in C:\:
  9906.  
  9907.             c:\command /c myprog [parameters]
  9908.  
  9909.        If you need to continue to use this method, you can define an
  9910.        alias:
  9911.  
  9912.             alias myprog `c:\command /c myprog %&`
  9913.  
  9914.        If the program is large enough to overwrite the transient portion
  9915.        of COMMAND.COM, you will need to change COMSPEC temporarily to
  9916.  
  9917.  
  9918.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       159 
  9919.  
  9920.  
  9921.        point to COMMAND.COM, to avoid an error message when exiting the
  9922.        program.
  9923.  
  9924.   Problems with Shelling to DOS
  9925.  
  9926.        Many application programs allow you to "shell to DOS" from inside
  9927.        the program.  If you have trouble shelling to DOS, or running a
  9928.        program which uses an implicit shell (e.g., a hard disk manager
  9929.        which shells to DOS to perform file copies), check your COMSPEC
  9930.        and 4DSHELL settings.  To shell to 4DOS, COMSPEC must point to
  9931.        4DOS.COM, and the 4DOS EXE file must be in the same directory
  9932.        that COMSPEC points to, or if it is not, the /L: switch must be
  9933.        set in 4DSHELL.  (See Installation for more details on COMSPEC
  9934.        and 4DSHELL.)  You can view the settings of these variables with
  9935.        the command SET /P; this is a more reliable approach than looking
  9936.        at AUTOEXEC, since it tells you what the variables are really set
  9937.        to, instead of what you tried to set them to.
  9938.  
  9939.        You can test whether these variables are set up properly by
  9940.        changing to the directory you are in when the problem occurs, and
  9941.        entering %COMSPEC at the prompt.  This will attempt to execute
  9942.        the program COMSPEC points to.  If this works and 4DOS starts,
  9943.        type EXIT to return to the previous shell.  If it fails, correct
  9944.        COMSPEC and/or 4DSHELL.
  9945.  
  9946.        If COMSPEC and 4DSHELL are set correctly and you still cannot
  9947.        shell to DOS, you may have too little memory.  Try running a
  9948.        smaller application which also shells to DOS and verify that it
  9949.        works correctly; if so, see if the problem application can be
  9950.        adjusted to provide more free memory for a DOS shell.
  9951.  
  9952.        Finally, you may have trouble shelling to DOS because the
  9953.        application is trying to shell directly to COMMAND.COM, rather
  9954.        than looking at the COMSPEC setting.  If you have moved
  9955.        COMMAND.COM or changed your PATH since you installed 4DOS, make
  9956.        sure there is a copy of COMMAND.COM accessible to the program and
  9957.        see if it will then shell properly.  You may need to contact the
  9958.        program manufacturer to determine if a particular program shells
  9959.        directly to COMMAND.COM.
  9960.  
  9961.  
  9962.  
  9963.  
  9964.  
  9965.  
  9966.  
  9967.  
  9968.  
  9969.  
  9970.  
  9971.  
  9972.  
  9973.  
  9974.  
  9975.  
  9976.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       160 
  9977.  
  9978.  
  9979.   Name Conflicts with 4DOS Commands
  9980.  
  9981.        You may have a program which has the same name as a 4DOS internal
  9982.        command.  Many 4DOS users use Vern Buerg's excellent file viewer,
  9983.        LIST.COM, whose name conflicts with 4DOS' internal LIST command.
  9984.        Such conflicts can be solved in one of two ways.  If you want to
  9985.        disable the 4DOS internal command entirely, use the SETDOS /I-
  9986.        command.  For example:
  9987.  
  9988.             setdos /i-LIST
  9989.  
  9990.        The command can be re-enabled with SETDOS /I+ (see SETDOS in the
  9991.        Command Reference Guide).
  9992.  
  9993.        The other method is to set up an alias to redirect the command to
  9994.        the external program.  For example:
  9995.  
  9996.             alias list c:\util\list.com
  9997.  
  9998.        This also disables the internal command.  However you can then
  9999.        add another alias to invoke the internal command under a
  10000.        different name.  For example:
  10001.  
  10002.             alias show *list
  10003.  
  10004.   Problems with Memory-Resident Programs (TSRs)
  10005.  
  10006.        Most TSRs will work properly with 4DOS.  If you have trouble
  10007.        getting a TSR to pop up, you may need to use the SETDOS /L1
  10008.        command to convince the TSR that it is at the DOS prompt, or
  10009.        because it traps the DOS line input interrupt to do some of its
  10010.        work.
  10011.  
  10012.        If you have trouble getting a TSR to unload, the problem may be
  10013.        due to the method used by the TSR to remove itself from memory.
  10014.        In most cases programs which cannot be unloaded directly can be
  10015.        removed using the MARK and RELEASE utilities available from
  10016.        TurboPower Software.  These programs are part of a package called
  10017.        TSRCOM which also contains many other useful utilities, and is
  10018.        available free on many bulletin boards and on-line services, and
  10019.        is included on the 4DOS Utility Disk available from JP
  10020.        Software.
  10021.  
  10022.  
  10023.  
  10024.  
  10025.  
  10026.  
  10027.  
  10028.  
  10029.  
  10030.  
  10031.  
  10032.  
  10033.  
  10034.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       161 
  10035.  
  10036.  
  10037.   Glossary
  10038.  
  10039.        4DSHELL:  An environment variable which defines the 4DOS switch
  10040.        values for secondary shells.
  10041.  
  10042.        4START:  A batch file which is executed whenever 4DOS is started,
  10043.        either as a primary shell or a secondary shell.
  10044.  
  10045.        Alias:  A shorthand name for a command or series of commands.
  10046.  
  10047.        Alias Argument:  A numeric variable included in an alias
  10048.        definition, allowing a different value to be used in the alias
  10049.        each time it is executed.
  10050.  
  10051.        ANSI.SYS:  A device driver supplied with MS-DOS which provides
  10052.        enhanced screen display and keyboard macros, or one of the many
  10053.        similar programs available free or as shareware or retail
  10054.        products.
  10055.  
  10056.        Append:  Concatenation of one file or string onto the end of
  10057.        another.  (There is also an MS-DOS external command, APPEND,
  10058.        which has an entirely different meaning -- and should be used
  10059.        extreme with caution!)
  10060.  
  10061.        Application:  A program run from the command prompt or a batch
  10062.        file.  The term is used broadly to mean any program other than
  10063.        the command processor; and more narrowly to mean a program with a
  10064.        specific purpose such as a spreadsheet or word processing
  10065.        program, as opposed to a utility.
  10066.  
  10067.        Archive:  A file attribute indicating that the file has been
  10068.        modified since the last backup (presuming that the last backup
  10069.        cleared the archive attribute, as most backup programs do).  Also
  10070.        sometimes used to refer to a single file which contains a number
  10071.        of other files in compressed form.
  10072.  
  10073.        Argument:  A piece of additional information placed after a
  10074.        command or function name.  For example in the command DIR XYZ,
  10075.        XYZ is an argument.  Also used to refer to an alias argument or
  10076.        batch file argument.
  10077.  
  10078.        ASCII:  The American Standard Code for Information Interchange,
  10079.        which defines numeric values for 128 different characters
  10080.        comprising the English alphabet, numbers, punctuation, and some
  10081.        control characters.
  10082.  
  10083.        ASCII File:  A file containing ASCII text, as opposed to a binary
  10084.        file which may contain codes, numbers, or other information that
  10085.        cannot be sensibly interpreted as text.
  10086.  
  10087.  
  10088.  
  10089.  
  10090.  
  10091.  
  10092.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       162 
  10093.  
  10094.  
  10095.        Attribute:  A characteristic of a file which can be set or
  10096.        cleared.  The standard attributes are Read-Only, Hidden, System,
  10097.        and Archive.  The special attributes Volume Label and Directory
  10098.        are also used for files of those types.
  10099.  
  10100.        AUTOEXEC.BAT:  A batch file which is AUTOmatically EXECuted when
  10101.        the computer is started.
  10102.  
  10103.        BAT File:  Same as a Batch File.
  10104.  
  10105.        Batch File:  A text file containing a sequence of MS-DOS or 4DOS
  10106.        commands.  Batch files are used to save command sequences so that
  10107.        they can be re-executed at any time, transferred to another
  10108.        system, etc.
  10109.  
  10110.        Batch File Argument:  A numeric variable used within a batch
  10111.        file, allowing a different value to be used at that spot in the
  10112.        file each time it is executed.
  10113.  
  10114.        Binary File:  A file containing information which does not
  10115.        represent or cannot sensibly be interpreted as text.  See also
  10116.        ASCII File.
  10117.  
  10118.        Block Device:  A physical device for input or output which can
  10119.        transmit or receive large blocks of data while the computer is
  10120.        engaged in other activities.  Examples include disk, tape, and
  10121.        CD-ROM drives, and many networks.
  10122.  
  10123.        Boot:  The process of starting the computer and loading MS-DOS
  10124.        and the command processor into memory.
  10125.  
  10126.        Boot Directory:  The current directory at the time the system is
  10127.        booted, almost always the root directory of the boot drive.
  10128.  
  10129.        Boot Drive:  The disk drive that the system is booted from,
  10130.        usually A: (the floppy disk) or C: (the hard disk).
  10131.  
  10132.        Break: A signal sent to a program (including 4DOS) to tell it to
  10133.        halt what it is doing.  The Ctrl-C key  or Ctrl-Break key is used
  10134.        to send this signal.  Some external commands abort when they
  10135.        receive a break signal; others return to a previous screen or
  10136.        menu, or abort the current operation .
  10137.  
  10138.        BTM File:  A special type of batch file which is loaded into
  10139.        memory, dramatically speeding up execution.
  10140.  
  10141.        Buffer:  An area of memory set aside for storage.  Usually refers
  10142.        to disk buffers, used to save information as it is transferred
  10143.        between your program and the disk; or to the keyboard buffer.
  10144.  
  10145.  
  10146.  
  10147.  
  10148.  
  10149.  
  10150.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       163 
  10151.  
  10152.  
  10153.        Character Device:  A physical device for input or output which
  10154.        must communicate with your computer one character at a time.
  10155.        Examples include the console, communications ports, and printers.
  10156.  
  10157.        Code Page:  A set of definitions which tells DOS how to get and
  10158.        display date, time, and other information in the format
  10159.        appropriate to a particular country.
  10160.  
  10161.        Command Completion:  A 4DOS feature which allows you to recall a
  10162.        previous command by typing the first few letters of the command,
  10163.        then an up-arrow or down-arrow.
  10164.  
  10165.        Command Echoing:  A feature which displays commands as they are
  10166.        executed.  Echoing can be turned on and off.
  10167.  
  10168.        Command History:  A 4DOS feature which retains commands you have
  10169.        previously executed, so that they can be modified and re-executed
  10170.        later.
  10171.  
  10172.        Command Processor:  A program, such as 4DOS or COMMAND.COM, which
  10173.        interprets commands and executes other programs.  The command
  10174.        processor is the first program loaded when the system is booted.
  10175.  
  10176.        Command Recall:  See Command History.
  10177.  
  10178.        Command Tail:  The portion of a command consisting of all the
  10179.        arguments, i.e. everything but the command name itself.
  10180.  
  10181.        Compound Command:  See Multiple Commands.
  10182.  
  10183.        COMSPEC:  An environment variable which defines where to get the
  10184.        command processor for a secondary shell.
  10185.  
  10186.        Conditional Commands:  A 4DOS feature allowing commands to be
  10187.        executed or skipped depending on the results of a previous
  10188.        command.   See also Exit Code.
  10189.  
  10190.        CONFIG.SYS:  A file which tells MS-DOS what device drivers to
  10191.        install, what command processor to use, and other information
  10192.        about what to do when your system boots.  See your MS-DOS manual
  10193.        for more information.
  10194.  
  10195.        Console:  A term describing the PC keyboard and display,.
  10196.  
  10197.  
  10198.  
  10199.  
  10200.  
  10201.  
  10202.  
  10203.  
  10204.  
  10205.  
  10206.  
  10207.  
  10208.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       164 
  10209.  
  10210.  
  10211.        Control Character:  A character which is part of the ASCII code,
  10212.        but does not have a normal text representation, and which can be
  10213.        generated by pressing the Ctrl key along with another key.  For
  10214.        example the control character called "BEL" is generated by
  10215.        pressing Ctrl-G, and will cause the computer to beep if pressed
  10216.        at the MS-DOS prompt.
  10217.  
  10218.        Country Code:  See Code Page.
  10219.  
  10220.        CR:  The ASCII character "carriage return", generated by pressing
  10221.        the "Enter" key on the keyboard, and stored in most ASCII files
  10222.        at the end of each line.
  10223.  
  10224.        Critical Error:  An error, usually related to input, output, or
  10225.        network access, which prevents a program from continuing.  When a
  10226.        critical error occurs a prompt such as "R(etry), I(gnore),
  10227.        F(ail), or A(bort)" is given and you must decide what action to
  10228.        take.
  10229.  
  10230.        Current Directory:  The directory in which all file operations
  10231.        will take place unless otherwise specified.  For example if the
  10232.        current directory is C:\MYFILES then the command "DEL XYZ" will
  10233.        delete the file XYZ in the directory C:\MYFILES, and will not
  10234.        affect other files with the same name which may be in other
  10235.        directories.
  10236.  
  10237.        Description:  A string of up to 40 characters assigned to
  10238.        describe a file with the 4DOS DESCRIBE command.
  10239.  
  10240.        Device:  A physical device for input or output such as the
  10241.        console, a communications port, or a printer.  Sometimes the term
  10242.        "device" alone is used to refer to character devices such as
  10243.        those listed above, and excludes block devices.
  10244.  
  10245.        Device Driver:  A program which allows DOS to communicate with a
  10246.        device, and which is loaded into memory when the system is
  10247.        booted, via a statement in CONFIG.SYS.  Some device drivers are
  10248.        used to manage memory or for other similar internal functions,
  10249.        rather than to communicate with an external device.
  10250.  
  10251.        Directory:  A portion of any disk, identified by a name and a
  10252.        relationship to other directories in a "tree" structure, with the
  10253.        tree starting at the root directory.  A directory separates files
  10254.        on the disk into logical groups, but does not represent a
  10255.        physical division of the data on the disk.
  10256.  
  10257.        Disk Swapping:  A type of swapping where the transient portion of
  10258.        4DOS is stored on disk while an application is running.
  10259.  
  10260.  
  10261.  
  10262.  
  10263.  
  10264.  
  10265.  
  10266.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       165 
  10267.  
  10268.  
  10269.        DOS Memory:  The portion of your computer's memory available for
  10270.        use by DOS, the command processor, and application programs.  On
  10271.        most PCs this area consists of the first 640K bytes of the
  10272.        computer's memory (one K is 1024 bytes).
  10273.  
  10274.        Echo:  See Command Echoing.
  10275.  
  10276.        EMS Memory:  Memory which conforms to the Lotus - Intel -
  10277.        Microsoft Expanded Memory Specification (LIM EMS).  This
  10278.        hardware/software standard allows programs to access large
  10279.        amounts of memory outside of standard DOS memory or extended
  10280.        memory.  Most systems which have EMS memory have either a
  10281.        specific EMS board (on any PC or compatible system), EMS
  10282.        emulation software (on PC-AT compatible systems), or a 386
  10283.        control program such as QEMM or 386MAX (on 386 systems).  If you
  10284.        do not have one of these items, you probably do not have EMS
  10285.        memory.
  10286.  
  10287.        EMS Swapping:  A type of swapping where the transient portion of
  10288.        4DOS is stored in EMS memory while an application is running.
  10289.  
  10290.        Environment:  An area of memory which contains multiple entries
  10291.        in the form "NAME=value".  Each entry is called an environment
  10292.        variable, with the name "NAME".  See also master environment and
  10293.        passed environment.
  10294.  
  10295.        Environment Variable:  The name of a single entry in the
  10296.        environment.  Environment variables are entered with the SET
  10297.        command, and used to associate the specified value with the
  10298.        specified name for any purpose desired by the user.  Typically,
  10299.        their function is to set default switches for a program, specify
  10300.        a directory path where files can be found, and so on.  When 4DOS
  10301.        encounters an environment variable name in a command in the form
  10302.        "%NAME" (or "%NAME%"), it substitutes the corresponding value in
  10303.        its place.
  10304.  
  10305.        Errorlevel:  A numeric value returned from an external command to
  10306.        indicate its result (e.g. success, failure, response to a
  10307.        question), and accessible via the IF ERRORLEVEL command and the
  10308.        %? environment variable.  The value is between 0 and 255, plus
  10309.        256 if the program was interrupted by a break, 512 if it aborted
  10310.        due to a critical error, or 768 if it remained resident in memory
  10311.        as a TSR.  See also Exit Code.
  10312.  
  10313.        Escape Character:  This term has two meanings.  In some contexts
  10314.        it means the 4DOS escape character, normally Ctrl-X, which is
  10315.        used to suppress the normal meaning of or give special meaning to
  10316.        the following character.  In other cases it refers to the
  10317.        specific ASCII character ESC.  The meaning must be determined
  10318.        from the context.
  10319.  
  10320.  
  10321.  
  10322.  
  10323.  
  10324.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       166 
  10325.  
  10326.  
  10327.        Executable Extensions:  A 4DOS feature which allows you to
  10328.        specify the application to be executed when a file with a
  10329.        particular extension is named at the command prompt.
  10330.  
  10331.        Executable File:  A file with the extension .COM or .EXE, which
  10332.        can be loaded into memory and run as a program.
  10333.  
  10334.        Exit Code:  The error level returned by an external command, or a
  10335.        similar exit code returned by a 4DOS internal command.  4DOS
  10336.        internal commands return an exit code of 0 if successful, or non-
  10337.        zero if unsuccessful.
  10338.  
  10339.        Expansion:  The process 4DOS goes through when it scans a command
  10340.        line and substitutes the appropriate actual values for aliases,
  10341.        alias arguments, batch file arguments, and environment variables.
  10342.  
  10343.        Extended ASCII Character:  A character which is not part of the
  10344.        standard set of 128 ASCII characters, but is used on the PC as
  10345.        part of an extended set of 256 characters.  These characters
  10346.        include international language symbols, and box and line drawing
  10347.        characters.
  10348.  
  10349.        Extended Memory:  Any memory on a 286-based (PC-AT compatible) or
  10350.        386-based computer system which is above the 1 MB (one megabyte,
  10351.        or 1024*1024 bytes) of memory that DOS can address directly.  Any
  10352.        PC-AT compatible or 386 system with more than 640K of memory has
  10353.        extended memory.  This memory can be used for a variety of
  10354.        purposes depending on the software installed to utilize it.  See
  10355.        also XMS.
  10356.  
  10357.        External Command:  A program which resides in an executable file,
  10358.        as opposed to an internal command which is part of the command
  10359.        processor.  For example, FORMAT and DISKCOPY are external
  10360.        commands; you can find them on your DOS disk under the names
  10361.        FORMAT.COM and DISKCOPY.COM.
  10362.  
  10363.        File Attribute:  See Attribute.
  10364.  
  10365.        File Description:  See Description.
  10366.  
  10367.        Filename Completion:  A 4DOS feature which allows you to type
  10368.        part of a filename on the command line, and have 4DOS fill in the
  10369.        rest for you.
  10370.  
  10371.        Free Memory:  Usually, the amount of DOS memory which is
  10372.        currently unoccupied and available for use by applications.
  10373.  
  10374.  
  10375.  
  10376.  
  10377.  
  10378.  
  10379.  
  10380.  
  10381.  
  10382.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       167 
  10383.  
  10384.  
  10385.        Hidden:  A file attribute indicating that the file should not be
  10386.        displayed with a normal DIR command, and should not be available
  10387.        for access by programs unless they specifically request use of
  10388.        hidden files.
  10389.  
  10390.        History:  See Command History.
  10391.  
  10392.        Insert Mode:  When editing text, a mode in which newly typed
  10393.        characters are inserted into the line at the cursor position,
  10394.        rather than overwriting existing characters on the line.  See
  10395.        also overstrike mode.
  10396.  
  10397.        Internal Command:  A command which is part of the command
  10398.        processor, as opposed to an external command.  For example, DIR
  10399.        and COPY are internal commands.
  10400.  
  10401.        Keyboard Buffer:  A buffer which holds keystrokes you have typed
  10402.        that have not yet been used by the currently executing program.
  10403.  
  10404.        Label:  A marker in a batch file which allows GOTO or GOSUB
  10405.        commands elsewhere in the batch file to "jump" to the command on
  10406.        the line following the label.  See also Volume Label.
  10407.  
  10408.        LF:  The ASCII character "line feed", not usually generated from
  10409.        the keyboard, but stored in most ASCII files at the end of each
  10410.        line after the CR character.
  10411.  
  10412.        Master Environment:  The master copy of the environment
  10413.        maintained by the command processor.  The master environment is
  10414.        manipulated with the SET and UNSET commands.  The size of the
  10415.        master environment is set by the /E: command line switch.
  10416.  
  10417.        Memory Resident Mode:  A method of installing 4DOS where swapping
  10418.        is disabled, and all of 4DOS remains permanently resident in
  10419.        memory.  Memory-resident mode requires much more memory than the
  10420.        normal swapping mode.
  10421.  
  10422.        Multiple Commands:  A 4DOS feature which allows multiple commands
  10423.        to be placed on a line, separated by a caret (^) or other user-
  10424.        defined character.
  10425.  
  10426.        Multitasking:  A capability of some software (and the related
  10427.        hardware) which allows two or more programs to run apparently
  10428.        simultaneously on the same computer.  Multitasking software for
  10429.        PC compatible systems includes programs like DESQview.
  10430.  
  10431.        Option:  See Switch.
  10432.  
  10433.  
  10434.  
  10435.  
  10436.  
  10437.  
  10438.  
  10439.  
  10440.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       168 
  10441.  
  10442.  
  10443.        Overstrike Mode:  When editing text, a mode in which newly typed
  10444.        characters overwrite existing characters on the line, rather than
  10445.        being inserted into the line at the cursor position.  See also
  10446.        Insert Mode.
  10447.  
  10448.        Parameter:  See Argument.
  10449.  
  10450.        Parsing:  The process 4DOS performs when it analyzes the command
  10451.        line, performs alias and environment variable expansion, and
  10452.        finds the appropriate internal command or external command to
  10453.        execute.
  10454.  
  10455.        Passed Environment:  A copy of the master environment created
  10456.        before running an application, so that any changes made by the
  10457.        application will not affect the master environment.  The size of
  10458.        the passed environment is determined by the amount of space
  10459.        actually used in the master environment when the application is
  10460.        started.
  10461.  
  10462.        Path:  A specification of the directories a file resides in,
  10463.        including all parent directories.  For example, the path for
  10464.        C:\WPFILES\MYDIR\MEMO.TXT is C:\WPFILES\MYDIR\.  Also used to
  10465.        refer to the environment variable PATH, which contains a series
  10466.        of path specifications used when searching for external commands
  10467.        and batch files.
  10468.  
  10469.        Pipe:  A method for collecting the standard output of one program
  10470.        and passing it on as the standard input of the next program to be
  10471.        executed, signified by a vertical bar "|" on the command line.
  10472.        See also Redirection.
  10473.  
  10474.        Primary Shell:  The copy of the command processor which is loaded
  10475.        when the system boots.
  10476.  
  10477.        RAM Disk:  A pseudo "disk drive", created by software, which
  10478.        appears like a normal physical disk drive to programs.  RAM disks
  10479.        can be stored in extended memory, XMS memory, EMS memory, or DOS
  10480.        memory, and provide a convenient way for programs to use this
  10481.        memory for temporary files.
  10482.  
  10483.        Read-Only:  A file attribute indicating that the file can be
  10484.        read, but not written by MS-DOS and 4DOS.
  10485.  
  10486.        Reboot:  The process of restarting the computer, usually by
  10487.        pressing the Ctrl, Alt, and Del keys simultaneously.
  10488.  
  10489.  
  10490.  
  10491.  
  10492.  
  10493.  
  10494.  
  10495.  
  10496.  
  10497.  
  10498.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       169 
  10499.  
  10500.  
  10501.        Redirection:  A method for collecting the standard output of a
  10502.        program in a file, and/or of providing the standard input for a
  10503.        program from a file, signified respectively by a greater than
  10504.        symbol ">" or less than symbol "<" on the command line.  See also
  10505.        Pipe.
  10506.  
  10507.        Replaceable Parameter:  See Alias Argument and Batch File
  10508.        Argument.
  10509.  
  10510.        Resident Portion:  The small portion of 4DOS stored permanently
  10511.        in memory when swapping mode is in use, as opposed to the larger
  10512.        transient portion.  The resident portion is stored as close as
  10513.        possible to the beginning of DOS memory.
  10514.  
  10515.        Root Directory:  The first directory, from which all other
  10516.        directories are "descended."  The root directory is referenced
  10517.        with a single backslash (\).  When a disk is first formatted, it
  10518.        is the only directory.
  10519.  
  10520.        Secondary Shell:  Any copy of any command processor which is
  10521.        loaded after the system boots.  Secondary shells may be started
  10522.        from the command line; by executing a "shell to DOS" operation
  10523.        from within an application; implicitly by executing some MS-DOS-
  10524.        related functions within certain applications; or by starting a
  10525.        new partition in a multi-tasking or task switching system.
  10526.  
  10527.        Shell:  A command processor.  Also used to refer to a program
  10528.        which gives access to MS-DOS functions and commands through a
  10529.        menu- or mouse-driven system.
  10530.  
  10531.        Source:  In the 4DOS file commands (COPY, MOVE, and RENAME), the
  10532.        original files before any copying or modification has taken
  10533.        place, i.e. those specified earlier on the command line.  See
  10534.        also Target.
  10535.  
  10536.        Stack:  An area of memory used by any program to store temporary
  10537.        data while the program is running; more generally, any such
  10538.        storage area where the last item stored is normally the first one
  10539.        removed.
  10540.  
  10541.        Standard Error:  A file or character device where error messages
  10542.        from a program are displayed.  Standard error output always goes
  10543.        to the console, unless redirection is used.
  10544.  
  10545.        Standard Input:  A file or character device where a program
  10546.        obtains its normal input.  Standard input always comes from the
  10547.        console, unless redirection is used.
  10548.  
  10549.  
  10550.  
  10551.  
  10552.  
  10553.  
  10554.  
  10555.  
  10556.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       170 
  10557.  
  10558.  
  10559.        Standard Output:  A file or character device where normal output
  10560.        from a program is displayed.  Standard output always goes to the
  10561.        console, unless redirection is used.
  10562.  
  10563.        Subdirectory:  Any directory other than the root directory.  See
  10564.        also Root Directory.
  10565.  
  10566.        Swap File:  A disk file created by 4DOS to store its transient
  10567.        portion when disk swapping is in use.
  10568.  
  10569.        Swapping:  A 4DOS feature which removes the larger transient
  10570.        portion of 4DOS from DOS memory while an application is running,
  10571.        leaving the maximum possible amount of memory for the
  10572.        application, yet allowing 4DOS to retain information such as the
  10573.        command history after the application is finished.  See also XMS
  10574.        Swapping, EMS Swapping, and Disk Swapping.
  10575.  
  10576.        Switch:  An argument to an internal command or application which
  10577.        specifies a particular behavior or setting.  For example, the
  10578.        command "DIR /P" might be referred to as "having the /P switch
  10579.        set".  Also, a configuration value for 4DOS specified on the
  10580.        SHELL= line in CONFIG.SYS, or in 4DSHELL.
  10581.  
  10582.        System:  A file attribute indicating that the file belongs to MS-
  10583.        DOS and should not be accessed by normal programs.
  10584.  
  10585.        Target:  In the 4DOS file commands (COPY, MOVE, and RENAME), the
  10586.        final files after any copying or modification has taken place;
  10587.        generally those referred to by the last specification on the
  10588.        command line.  See also Source.
  10589.  
  10590.        Transient Portion:  The larger portion of 4DOS stored in memory
  10591.        temporarily when swapping mode is in use, as opposed to the
  10592.        smaller resident portion.  The transient portion is stored as
  10593.        close as possible to the end of DOS memory, and is removed from
  10594.        memory whenever an application is executed.
  10595.  
  10596.        TSR:  A Terminate and Stay Resident program, i.e. a program which
  10597.        "terminates" but remains resident in DOS memory, to provide
  10598.        capabilities such as network support, a pop-up notepad or
  10599.        telephone dialer, a disk cache, or mouse support.
  10600.  
  10601.        UMB:  An XMS Upper Memory Block, whose address is above the end
  10602.        of normal DOS memory, but is within the 1 megabyte of memory that
  10603.        DOS can address directly.
  10604.  
  10605.  
  10606.  
  10607.  
  10608.  
  10609.  
  10610.  
  10611.  
  10612.  
  10613.  
  10614.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       171 
  10615.  
  10616.  
  10617.        Variable:  See Alias Argument, Batch File Argument, and
  10618.        Environment Variable.
  10619.  
  10620.        Volume Label:  A special, hidden file placed on any disk whose
  10621.        name constitutes a "label" for the entire disk.
  10622.  
  10623.        White Space Character:  Generally, a character used to separate
  10624.        arguments on the command line.  The white space characters
  10625.        recognized by 4DOS are the space, tab, comma, semicolon, and
  10626.        equals sign.
  10627.  
  10628.        Wildcard:  A character ("*" or "?") used in a filename to specify
  10629.        the possibility that any single character ("?") or sequence of
  10630.        characters ("*") can occur at that point in the actual name.
  10631.  
  10632.        XMS Memory:  A software method for accessing extended memory on
  10633.        286 and 386 systems (and some systems which support version 4.0
  10634.        of the EMS memory specification).  XMS memory is not additional
  10635.        memory, but is a software specification only.  Its use generally
  10636.        requires Microsoft's HIMEM.SYS be installed as a device driver,
  10637.        or that another program such as 386MAX or MOVE-EM be used.
  10638.  
  10639.        XMS Swapping:  A type of swapping where the transient portion of
  10640.        4DOS is stored in XMS memory while an application is running.
  10641.  
  10642.  
  10643.  
  10644.  
  10645.  
  10646.  
  10647.  
  10648.  
  10649.  
  10650.  
  10651.  
  10652.  
  10653.  
  10654.  
  10655.  
  10656.  
  10657.  
  10658.  
  10659.  
  10660.  
  10661.  
  10662.  
  10663.  
  10664.  
  10665.  
  10666.  
  10667.  
  10668.  
  10669.  
  10670.  
  10671.  
  10672.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       172 
  10673.  
  10674.  
  10675.   Index
  10676.  
  10677.       4DOS                                 Cancel batch job   34
  10678.          Features  1                       CD   57
  10679.          Memory Usage  18                  CDD   58
  10680.          Startup Options  21               CHCP   59
  10681.          Swapping mode  22                 CHDIR   57
  10682.        4DOS.COM  9                         CLS   60
  10683.        4DOS.DOC  10                        CMDLINE   3, 40
  10684.        4DOS286.EXE  9                      Code page   59
  10685.        4DOS88.EXE  9                       COLOR   61
  10686.        4DOSSTAK  149                       Colors   60, 114
  10687.        4DSHELL  15, 25, 160                Command
  10688.        4START  25, 27, 119, 151              Completion   29
  10689.                                              Echoing   32
  10690.        ? 48                                  History and Recall   29
  10691.                                              Line   3
  10692.        ALIAS   35, 49                        Line arguments   32
  10693.        Alias                                 Line editing   28
  10694.          Expansion   35                      Parsing   45
  10695.          List   130                          Processor   80
  10696.          List size   21, 99                  Reference Guide   46
  10697.          Parameters   36                     Separator   30, 119
  10698.        Aliases   3, 10, 35, 37, 78,          Syntax   47
  10699.        130                                 COMMAND.COM   26, 157
  10700.        AND   30                            Comment   110
  10701.        ANSI   60, 61, 119, 156             COMPAT.DOC   10
  10702.        Append   62                         Compatibility   10
  10703.        Archive attribute  52, 62           COMPOUND   30, 119
  10704.        Argument quoting 32                 COMSPEC   15, 160
  10705.        ASP 146                             Conditional commands  3, 30
  10706.        Association of Shareware            Conditional execution   88, 91
  10707.          Professionals 146                 CONFIG.SYS   14, 19
  10708.        ATTRIB   52, 89                     Configuration   17
  10709.        Attribute   52                      Console   64
  10710.        AUTOEXEC.BAT   14, 25, 27, 151      COPY   62
  10711.        Automatic Installation   13         Country code   65
  10712.                                            Create subdirectories   98
  10713.        Batch                               Critical errors   154
  10714.          File nesting   55                 CTTY   64
  10715.          File echoing   76                 Current directory   57, 107, 109
  10716.          File parameters   123             Cursor   113, 121, 155
  10717.          File processing   56                    File variables   34               DATE   65
  10718.          Files   33                        DEL   66
  10719.          Processor   7                     DELAY   67
  10720.          Variables   157                   DESCRIBE   68
  10721.        BEEP   53                           DESCRIPT.ION   68
  10722.        Box   73                            DIR   69
  10723.        BREAK   54                          Directory stack   72, 107
  10724.                                            DIRS   72
  10725.        CALL   55                           Disk swapping   22
  10726.        CANCEL   56, 108                    Disk write verification   133
  10727.  
  10728.  
  10729.  
  10730.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       173 
  10731.  
  10732.  
  10733.        DOS Shells   14                     EXTENDED   89
  10734.        DOS.HLP   10                        Extended key codes   148
  10735.        DOSMEM   89                         Extended memory   99
  10736.        DRAWBOX   73                        External command   102
  10737.        DRAWHLINE   74
  10738.        DRAWVLINE   75                      F1   28, 95
  10739.                                            F8, F9 & F10   28, 30
  10740.        ECHO   32, 76                       File descriptions   2, 68
  10741.        Edit   78                           File attributes   52
  10742.        EGA   156                           Filename completion   30
  10743.        ELSE[IFF]   91                      Floppy disk   152
  10744.        EMS   18, 89                        FOR   81
  10745.          Swapping   23, 153                FREE   82
  10746.        ENDIFF   91                         Frequency   53
  10747.        ENDLOCAL   77, 122
  10748.        ENDTEXT   126                       GE   88
  10749.        Environment   2, 131                GLOBAL   83
  10750.          Size   2, 21                      GOSUB   84, 112
  10751.          Space   99                        GOTO   85
  10752.          Variables   2, 40, 78, 92,        GT   88
  10753.                      93, 117, 122
  10754.             @ext   42                      Hardware errors   152
  10755.             @full   42                     HELP   10, 11, 86
  10756.             @length[string]   42           Hidden attribute   52, 79
  10757.             @name   42                     HISTORY  87, 119
  10758.             @path   42                     History list   29, 87
  10759.             @search   42                   History size   22
  10760.             @substr   42                   Horizontal line  74
  10761.             _BG   41
  10762.             _CPU   41                      I/O Redirection   43
  10763.             _CWD   41                      IF   88
  10764.             _CWDS   41                     IFF   91
  10765.             _CWP   41                      INKEY   92, 148
  10766.             _CWPS   41                     INPUT   93
  10767.             _DATE   41                     INSTALL   13
  10768.             _DISK   41                     INSTALL.BAT   9
  10769.             _DOSVER   41                   Installation   9, 150
  10770.             _FG   41                       INTERNAL   120
  10771.             _SHELL   41                    ISALIAS   89
  10772.             _TIME   42                     ISDIR  90
  10773.        EQ   88
  10774.        ERASE   66                          Key Codes   148
  10775.        Error messages   136                KEYSTACK   10, 11, 39, 94,
  10776.        ERRORLEVEL   30, 41, 89                        148, 149
  10777.        ESCAPE   31, 119
  10778.        Escape character   31, 119          Label   85, 134
  10779.        ESET   78                           Language support   59
  10780.        EXCEPT   79                         LE   88
  10781.        Executable extensions   37          LINE   120
  10782.        EXIST   89                          Line editing mode  120
  10783.        EXIT   80                           LIST   95
  10784.        Exit code   30                      LOG   97
  10785.        Expanded memory   99                LT   88
  10786.  
  10787.  
  10788.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       174 
  10789.  
  10790.  
  10791.        Manual Installation   17            SCREEN   113
  10792.        MARK   161                          Screen length   156
  10793.        MD   98                             SCRPUT   114
  10794.        MEMORY   99, 153                    SELECT   115
  10795.        Memory resident mode   18,23        SET   40, 117
  10796.        Memory-resident programs   161      SETDOS   29, 30, 31, 32, 43,
  10797.        MKDIR   98                                   76,  87, 110, 119,
  10798.        MODE   120                                   155, 156, 161
  10799.        MONITOR   90                        SETLOCAL   77, 122
  10800.        MOVE   100                          SHAPE   121
  10801.        Multiple arguments   4              Shell   14, 19, 21
  10802.        Multiple commands   2, 30           Shelling to DOS   160
  10803.                                            SHIFT   34, 123
  10804.        Name conflicts   161                Standard
  10805.        NE   88                               Error   43
  10806.        Network   3, 158                      Input   43, 64, 125, 135
  10807.        NOCLOBBER   43, 120                   Output   43, 64, 125, 135
  10808.                                            Starting 4DOS   27
  10809.        OR   30                             Stopwatch   128
  10810.        OS/2 DOS box   1, 20                Subdirectory   98, 109
  10811.                                            Subroutine   84, 112
  10812.        Parent directory   109              SWAPPING   124
  10813.        PATH   40, 98, 102                  Swapping mode   18
  10814.        PAUSE   103                         System attribute   52
  10815.        Pipes   44, 125,158
  10816.        PKUNZIP   10, 11                    TEE   125
  10817.        POPD   104                          TEXT 1  26
  10818.        Primary shell   14                  THEN   91
  10819.        Programming for 4DOS   149          TIME   127
  10820.        PROMPT   105                        TIMER   128
  10821.        PUSHD   107                         Tips   150
  10822.                                            TMP   41, 44, 159
  10823.        Quick Start   12                    Transient portion   18, 124
  10824.        QUIT   108                          Troubleshooting   150
  10825.        Quotes   32                         TSR   161
  10826.                                            TSRCOM   161
  10827.        RAM   99                            TYPE   129
  10828.        RD   109
  10829.        Read-only attribute   52            UMB   23
  10830.        README.DOC   10                     UNALIAS   35, 50, 130
  10831.        Redirection   3, 120                UNSET   131
  10832.        RELEASE   161                       UPPER   121
  10833.        REM   110                           Using 4DOS   27
  10834.        REN   111
  10835.        RENAME   111                        Variable functions   42
  10836.        Replaceable parameters   36         Variables   131
  10837.        Resident portion   18               VER   132
  10838.        RETURN   84, 112                    VERBOSE   32, 76, 110, 121
  10839.        RMDIR   109                         VERIFY   63, 133
  10840.        Root directory   98, 109            Version number   132
  10841.        Root shell   14                     Vertical line   75
  10842.        ROWS   120                          VGA   156
  10843.  
  10844.  
  10845.  
  10846.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       175 
  10847.  
  10848.  
  10849.        VIDEO   90, 155
  10850.        Video cursor   155
  10851.        VOL   134
  10852.        Volume label   134
  10853.  
  10854.        Wildcards   2
  10855.  
  10856.        XMS   18, 90
  10857.          Memory   99
  10858.          Swapping   23
  10859.          Upper Memory Block   23
  10860.  
  10861.        Y   135
  10862.  
  10863.  
  10864.  
  10865.  
  10866.  
  10867.  
  10868.  
  10869.  
  10870.  
  10871.  
  10872.  
  10873.  
  10874.  
  10875.  
  10876.  
  10877.  
  10878.  
  10879.  
  10880.  
  10881.  
  10882.  
  10883.  
  10884.  
  10885.  
  10886.  
  10887.  
  10888.  
  10889.  
  10890.  
  10891.  
  10892.  
  10893.  
  10894.  
  10895.  
  10896.  
  10897.  
  10898.  
  10899.  
  10900.  
  10901.  
  10902.  
  10903.  
  10904.   4DOS Reference Manual         Copyright 1991, JP Software Inc.       176 
  10905.  
  10906.